Remote file transfer using Rsync
While we usually deal with huge data, we come across situations where we need to copy such data from one server/host to a remote host.
One of the useful command is ‘rsync‘, which is faster than the traditional scp command!
Below is the syntax with example :
[root@myhost file_path]# rsync -avrz /file_path/* user@12.12.12.12:/destination_path/ >> /log_path/rsync.log 2>> /log_path/rsync.err
where as,
-a -> Its same as –archive, which means to say preserver everything as it is. No changes between source and destination
-v -> Its same as –verbose, which displays information about the current execution
-r -> Its same as –recursive, copy directory and sub-directories, recursively
-z -> Its same as –compress, which compress data while its being transferred