Using rsync to create backup

rsync is mostly used to synchronize files between Internet servers, but this powerful tool also can be used to create local backup.

I have an external harddisk for backup. Instead just using copy command to save my computer file to the external harddisk I want to verify first if the file saved there is exactly the same I have in the computer. Case the files are different I want to save a newer version and rename the older version.

It is easy to do using rsync:

rsync --suffix="_`date +%Y.%m.%d.%H.%M`" -bacH localdirtobackup /media/user/external_harddisk/

If the file exist in the external harddisk, but its content is different then it will be renamed to filename_YEAR.month.day.Hour.Minute

It also could interesting to know when some file was corrupted in the computer or external harddisk, or if some virus is changing your files.

One thought on “Using rsync to create backup

  1. Interesting. I also use rsync for backups but always replace the remote version with the new version. I’ll consider trying your method.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s