jmr
Jan 16 2003, 05:57 AM
Anyone with any thoughts on how to achieve the following:
Backup all sites and mysql to a backup folder on the same server
transfer these files onto a remote server
I thought that perhaps the backup option could create the files fine and rysnc would be suitable to transfer the files. Would a cron for rsync do the trick and make it automated (weekly)
Post your thoughts and tips!
Isaac
Jan 17 2003, 02:44 PM
If you are short on either disk space or bandwidth, you probably want to use an "intelligent" backup solution.
For your local backup, create a zip (BZ2?) of each site's contents.
Compare the current zip with the prior zip, and prepare a "delta zip" containing the files that have been added or altered. Prepare a "kill list" of the files that have been deleted.
FTP the delta zip and the kill list to the other server. Unpack the zip for the directory, kill the deleted files, unpack the delta zip to add/overwrite the new files, delete the delta.zip, rezip the site, and delete the unzipped site.
A similar strategy can be used for each of your databases.
Deltas are your friend.
twhiting9275
Jan 18 2003, 07:48 PM
As root owns the backups (or should) on any CP server, it's rather hard to use wget and ftp, simply because you can't login as root on any server through ftp.
That said, there are ways to do this that don't exactly involve using the server's setup, though I'd recommend not using this as a permament backup.. What you can do is this:
A. Create a mysql table of all of your users on the remote server. You'll need to update this on an almost daily basis, but at lest it'll get the job done.
B. On this remote server, have a cron job called @ midnight (or whenever), that points to a script that will automatically parse through the script and download each of them, using WHM's available methods and curl or wget.
It's a bit tricky, but, I've actually gotten it to work a time or three in order to move mass accounts at the same time.
twhiting9275
Jan 18 2003, 07:54 PM
miss-post (sorry)
j_smith
Jan 18 2003, 08:57 PM
QUOTE
Backup all sites and mysql to a backup folder on the same server
transfer these files onto a remote server
I do this every night.
mysqlhotcopy databases to a backup dir, tar/gz databases into one file.
rsync (via cron) the databases file and my entire /var/www/html directory (where my sites live) to my remote backup server at home.
rackAID
Jan 18 2003, 09:36 PM
I use rsync with ssh. You can have root push files to another server.
I am working on a how-to but I need to check it a couple of more times before posting.
How big are cpanel backups?
twhiting9275
Jan 18 2003, 11:29 PM
CP backups generally arent the largest in the world, unless you've got a huge database or directory..
jmr
Jan 20 2003, 06:08 AM
Looks like rsync and cron for the tars is the way to go....
files would be general websites with small databases nothing to large so cant see there being much of a problem.
Very interesting to hear what you had to say on this *thanks*
huck - let me know when the how to is ready....would be useful.
rackAID
Jan 20 2003, 08:51 AM
rackAID
Jan 20 2003, 08:51 AM
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.