0

I want to use RSYNC for the incremental copy of a folder which has a considerable size. The source (a directory) resides on an External hard disk (as we cannot have a network link between the source and destination) and the destination is a local system. Every week , the HDD is formated and that same directory is re-copied inside the External Hard Disk (it reflects the same data + any changes that has occurred since we last copied the directory into our system). I was wondering whether RSYNC can perform an incremental copy in this particular case. Thanking You

3

Sure. You can use something similar to:

rsync -av --delete <src> <dst>

to replicate src to dst.

The first copy will be slow (all data must be copied), but successive ones will be much faster (only modified/added files will be copied).

Using the --delete switch tell rsync to delete files which are not in src anymore; using it, you should be able to avoid the regular re-formatting of the external drive.

If you are interested in keeping hystorical/versioned backup, rather then directly using rsync, give a look at rsnapshot: it is based on rsync, but adds integrated backup deletion/rotation.

  • Let me tell you guys the exact scenario: each week , we receive this external hard disk with has around 900 gb data; we have to 'backup' this data into our system each time we receive this external hard drive.Needless to say ,copying the whole 900gb+ data each week is very redundant so that is why I am considering RSYNC for this purpose. – Yama Jun 5 '16 at 15:17
1

As has already been noted rsync can be used to make your backups. If you already have a backup, rsync can be used to apply the incremental changes. It also has features to save changes so you have historical backups using the --backup and related flags.

There are a number of backup solutions built on top of the rsync protocol designed to keep historical backups that may be more space efficient. I've been using BackupPC to backup both Linux and Windows systems. You would need to run it manually in your case.

  • scenario: each week , we receive this external hard disk with has around 900 gb data; we have to 'backup' this data into our system each time we receive this external hard drive.Needless to say ,copying the whole 900gb+ data each week is very redundant so that is why I am considering RSYNC for this purpose. Now the concern for me is that when we send back that hard drive it has be formated ; after a week the same process occurs: they RECOPY the same directory to the hard drive(with the changes of course) , they send it to us and we again, have to copy it in order to reflect the changes. – Yama Jun 5 '16 at 15:24
  • as far as I have read, RSYNC works with inodes and blocks.. so wouldn`t that drive formatting disallow rsync to work ?? – Yama Jun 5 '16 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.