Nov 062009
 

cmd    flags            remote server               local server
rsync -avHe ssh –progress [email protected]:/home/user/mail/ /home/user/mail/
rsync -avHe ssh –progress [email protected]:/home/user/etc/ /home/user/etc/

Safe way to copy files

Source directory: /mnt/nfs/contents
Destination directory: /home/user1/public_html
Log files location: /home/user1/logs/copy.txt

check the total number of files in the source directory:
$ tree /mnt/nfs/contents/ | wc -l
16247

run the command:
$ rsync -Pavzh --log-file=/home/user1/logs/copy.txt /mnt/nfs/contents /home/user1/public_html &

Check the progress:

$ tail -f /home/user1/logs/copy.txt

Count the total number of files in the destination directory:
$ tree /home/user1/public_html/contents/ | wc -l
16247

 
If the copy process being interrupted, you just need repeat step 2 and the copying process will continue from the last state before interruption.

 Posted by at 8:01 am

 Leave a Reply