Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:using_rsync_to_backup [2009/11/10 19:27]
Joel Dare
linux:using_rsync_to_backup [2020/06/01 22:53] (current)
Line 1: Line 1:
 +====== Using RSync to Backup ======
  
 +I use RSync to backup my systems. ​ I backup the following.
 +
 +  * Backup my laptop to a small server at my home
 +  * Backup my web host to my server at home
 +  * Backup my CVS files at home to a second hard drive
 +
 +Here is the rsync command I use to sync to a windows share.
 +
 +  sudo rsync -rvh --size-only --delete \
 +  --exclude-from=/​home/​joel/​exclude.lst \
 +  /home/joel /​mnt/​jay/​ubuntop/​
 +
 +Here is a general RSync command.
 +
 +  rsync -avh --delete -e ssh source/ \
 +  username@remotemachine.com:/​path/​to/​destination/​
 +
 +If you are using rsync with a Windows share as the target, the -a option might not work since Windows doesn'​t support unix file permissions and such.  Instead, just use the -r option. ​ Also, lose the SSH option and rsync to a mounted windows share.
 +
 +  rsync -rvh --delete /source/ /​destination/​
 +
 +On my laptop I want to limit the bandwidth it uses so it doesn'​t slow me down.
 +
 +<​code>​
 +--bwlimit=KBPS
 +</​code>​
 +
 +Also, I often want to exclude a few things, which I can do with the following.
 +
 +<​code>​
 +--exclude=
 +</​code>​
 +
 +For some reason, I get errors when using rsync with a Windows share as the target. ​ Even though I can create directories and files there as a user, I have to execute rsync as root.  Not sure why this is.
 +
 +On a windows share, the date and timestamps don't seem to work consistently. ​ As a result, I use the --size-only option so that rsync looks only at the size of the file and not at the timestamp. ​ You could probably use crc checks as an alternative,​ but that probably adds a lot of time.
comments powered by Disqus
linux/using_rsync_to_backup.txt · Last modified: 2020/06/01 22:53 (external edit)