LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync as backup? (https://www.linuxquestions.org/questions/linux-software-2/rsync-as-backup-301159/)

ziggie216 03-13-2005 01:29 PM

rsync as backup?
 
I'm trying to figure out a way to backup my mail server to another server just incase if anything happens. Both server are at difference locations & different isp. I wanted that if the main email server goes down or that the isp is down, I can easily just switch ip pointing toward the backup server.

would rsync be the tool to do this job?

auximini 03-13-2005 01:45 PM

If all your mail is stored on the server (which it sounds like it is), then I think rsync is the easiest way to go. You could set up a cron job to run every hour or so and sync the directories. If bandwidth is an issue, you could instead write a script that tars and compresses your mail directory then copies it to the remote server and untar it.

Oh.. and don't forget to run rsync with "-e ssh" :)

Hope that helps

ziggie216 03-13-2005 01:54 PM

does the sync goes both way or one way? as in will both system have the sync informations or does it just tranfer toward one computer?

auximini 03-13-2005 02:22 PM

Your source directory will be the "master" directory. It will sync all new files to the destination directory. If, by chance, you get new files in your destination directory from somewhere else besides rsync, they will never appear on the source.

You can also specify the "--delete" option. This will delete files on the destination side that do not appear on the source side. So if you delete an email, the same email will also be deleted on your backup.


All times are GMT -5. The time now is 06:33 PM.