W: best way to clone server data using rsync
I'm about to clone 1TB of server data to a new file server I'm building.
Cloning will happen over the internal network, and it will take several days,
since I'll only run it while I'm awake/at home and checking up on the progress
every once in a while.
rsync seems like the right choice, but how will it handle job canceling when
I'm done for the day?
- will it resume files properly?
- will it run some sort of check sum to verify file integrity, or will I have
to run myself an integrity check like md5sum afterwards?
What's the right set of parameters to call rsync from a shell script? I'm not
used to sync such huge amount of files and directories, so I'm unclear about
how to call rsync in this case.
Here's what I got so far from google research:
rsync --sockopts=SO_SNDBUF=128000,SO_RCVBUF=128000 -e rsh --archive \
--recursive --partial --partial-dir=rsync-part --progress --append \
--files-from=/root/LISTOFFILES.txt --log-file=/root/rsync.log \
LISTOFFILES.txt was created using:
rsync --list-only > /root/LISTOFFILES.txt
Can somebody comment on the parameters, e.g. how these will work fine with job
canceling and how this will handle file integrity?
Is it safe to hit ctr+c to cancel the job, or is a SIGHUP to the rsync task
the recommended/necessary way?