rsync tips
By Rayed
rsync is a really smart file transfer tool, when you want to move a large directory from machine to machine it is the best tool you can use.
The tool utilise ssh protocol (among others) to transfer files, this is a sample command:
host_1# rsync /some/dir host_2:/other
The above command will copy the directory /some/dir from host_1 to host_2, the smart thing about rsync that it check what files are already copied so it won’t copy them again.
Of course when migrating all your data from machine to machine it could take hours to finish, so the best thing to do is to start rsync like this:
host_1# nohup rsync /some/dir host_2:/other < /dev/null &
nohup will keep rsync running even when your session with the server end, the other part “< /dev/null &" will allow you to continue working on the session without waiting for rsync to end.
The output of rsync command will be redirected to a file called “nohup.out”, of course nohup can be used with any command not just rsync.