Web Hosting Talk







View Full Version : Cron Help


SBS Marketing
05-02-2005, 05:51 PM
Howdy,

Any Cron experts out there that can help with this one:

I need a cron that runs once a week and:

1) Terminates account xxxxxx (Mirror copy)

2) Copies over entire account xxxxxx from Server #2 (This is the main account)

3) Runs this exact same procedure once a week.

Details:

Both servers on Linux
cPanel


Reason (If you are curious) is that Server #1 is a mirrored copy of the "true" website on Server #2. This website is updated once a week.

I run DNS Failsafe to point to Server #1 if Server #2 fails so I need Server #1 to have current info.

Any help would be greatly appreciated!

Angelo
05-02-2005, 06:50 PM
cPanel does not have a shell script for direct transferring accounts, only web interface that i recall. You will need another method for it. Maybe packaging the account on the main server and arranging the cron for downloading tarball and untarring it etc.

thejas
05-02-2005, 07:24 PM
I hope that this sort of setup will do the job.

server#1
* * * * 0 /scripts/pkgacct #####
* * * * 0 scp /home/cp-move#####.tar.gz server#2:/home/

server#2
* * * * 0 /scripts/restorepkg #####