

If the destination directory is not present (here bar), rsync automatically creates one and copies all the data in it. The above command will copy/sync all the files and directories present in directory foo to directory bar. Copy/Sync files and directory locally: If neither the source or destination path specifies a remote host, the rsync commands behave as a copy command.The above command will list the files and directories present in the directory foo. Using rsync as a list command: If only the source path is specified, the contents of the source are listed in an output format similar to ls -l.-z, –compress: Compress file data during the transfer.-h, –human-readable format: Outputs in a human readable format.More than two -v options are generally used for debugging rsync. Two -v options will give us information on the status of delta-transmission and on what files are up to date so as to be skipped and slightly more information at the end. A single -v will give us information about what files are being transferred and a brief summary about the data transferred at the end. -v, –verbose: By default, rsync works silently.A -H options must be explicitly specified for hard links.
UBUNTU GRSYNC SCHEDULE ARCHIVE
Note: The archive mode does not preserve hard links, because finding multiply-linked files is expensive. Archive mode includes all the necessary options like copying files recursively, preserving almost everything (like symbolic links, file permissions, user & group ownership and timestamps).

Rsync local-file Happens here: Rsync will first use SSH to connect as user to remote-host and will ask for user's password.

