[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: W: best way to clone server data using rsync



On Tue, May 01, 2012 at 01:08:14PM +0200, Tuxoholic wrote:
> Hi list
> 
> 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?

I use rsync for syncing and backups everyday, but I always do babysit it 
or at least check it when it finishes. Not sure if it will "resume files 
properly", but certainly it will update appropriately when used correctly.

> - 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?
> 

Certainly wouldn't hurt, though I don't think it's necessary...

> 
> 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 \
> root@myserver:/PATH2myOLDServerPool/* /mnt/Mount2myNewServerPool
> 
> LISTOFFILES.txt was created using:
> rsync --list-only > /root/LISTOFFILES.txt
> 

Often I use something like:

rsync --archive --one-file-system --hard-links --human-readable --inplace --numeric-ids --delete --progress --exclude-from '/home/indulekha/.rsync-exclude / /copy_of_system/

to duplicate a system, with the '~/.rsync-exclude' file containing 
files and directories to ignore. Hopefully it's obvious that "copy_of_system" 
is a path you determine. 

> Can somebody comment on the parameters, e.g. how these will work fine with job 
> canceling and how this will handle file integrity?

https://www.linux.com/news/enterprise/storage/8200-back-up-like-an-expert-with-rsynchttp://www.thegeekstuff.com/2010/09/rsync-command-examples/

> Is it safe to hit ctr+c to cancel the job, or is a SIGHUP to the rsync task 
> the recommended/necessary way?
>

ctrl-c will work. 

HTH!
-- 
❤ ♫ ❤ ♫ ❤ ♫ ❤   
 Indulekha 


Reply to: