Data copying is performed using the following command:
rsync --progress -avz -e ssh /var/www/ioiua/data/www/site root@ip:/var/www/site/data/www/site/
In this case, the -a flag is equivalent to the following set of flags: -rlptgoD
-r — indicates recursive copying of directories
-l — copy symbolic links as symbolic links
-p — preserve file permissions()
-t — preserve modification time if supported by the file system
-g — preserve the file group owner
-o — preserve the file owner
-D — (equivalent to options --devices --specials), i.e., --devices instructs rsync to copy character and block device files to another server and attempt to recreate them there. This option is ignored if rsync is not run by the root user. --specials — this option instructs rsync to copy special files, such as named pipes and sockets.
-v — this option instructs the rsync command to output more detailed status information at startup.
-z — this option instructs using compression during data transfer.
--progress — display the progress of data copying
-e ssh — instructs rsync to use the SSH protocol.
To copy in the reverse direction, use the following command:
rsync --progress -avz -e ssh user@host:/path/on/server/ /directory/path/
