rsync backup
Hi
i have centos 5.3 installed i use rsync to backup local to remote with rsync -avz -e "ssh -i /root/rsync-key" /sourcefolder/ root@remoteip:/destination folder/ . it also works properly but i want to copy this data on destination with datewise incremental backup how it possible AMAR |
this is probably more involved than you expect since the notion of modified time or incremental are not built into rsync.
I figure you have to options: option 1) setup a local backup process to generate weekly fulls and daily incrementals to a folder on your source pc. then rsync that backup folder to the destination. depending on the distribution you're using, you may have access to a simple backup program that will handle the generation of backups for you. if you don't have access to pre-fabricated backup applications, you can make your own. I found a good guide here: http://www.linux-backup.net/Full_Inc/ option 2) is more complex and will require a lot of script. if found a decent guide here: http://www.howtoforge.com/rsync_incr...apshot_backups good luck. |
Backup using rsync
Rsync is a wonderful tool for fast syncronization and backups, but not for datewise incrementals. What you need is a serious backup/restore tool.
|
Bacula should be good for it. :).
|
Also, there is amanda (zmanda has a front-end interface) which makes configuration a lot easier.
We use Zmanda and it is a life saver when you need to restore critical files. |
rsync is a very useful and powerful program for doing incremental transfers of files, whether that is locally or remotely.
Suppose I want to backup to my USB memory stick so I have an up-to-date copy of them wherever I go. My source folder here is ~/Documents and my memory stick is mounted at /media/disk right now. Initially, you will have to use rsync to copy all the files across, since an incremental copy doesn't yet exist. Quote:
Once that's done, you've got your initial copy done. Now when you need to synchronise the two copies, simply run the same command again. This time, rsync will go off and find only the files that have changed, and copy those over. When it has finished, both copies will then be up-to-date, and you can get back on the move. Check these links also, helpful for incremental backups: http://www.marksanborn.net/howto/use...nthly-backups/ http://www.linuxhomenetworking.com/f...-backup-script http://fluff.info/blog/arch/00000204.htm |
One important aspect of rsync is using the --delete option because you do not want to leave files that were deleted.
Be very CAREFUL with using the delete as you do NOT want to purge the files on the source. For a valid backup you would need to implement this, otherwise you will create a quagmire of non-valid data. I have used the --delete option when migrating server to server, the end user never knows their data be it email, file_shares, ect... was ever migrated. Otherwise the end user will be inundated with data they do NOT want. |
If you'd prefer both copies to remain completely synchronised, even if that means deleting files from either copy, add the --delete option, like so:
Code:
# rsync --delete -avh ~/Documents /media/disk |
Quote:
However, for backups to be valid they need to mirror what you are backing up. Otherwise you will have a quagmire of erroneous files. |
All times are GMT -5. The time now is 11:49 PM. |