![]() The -e option is used to specify the remote shell. The rsync syntax for the remote shell is as follows: rsync -e "SSH_COMMAND" SOURCE DESTINATION When using rsync to transfer data from a local computer to a Linux virtual private server (VPS), communication relies on the rsync daemon. Specify the path to the destination directory or file here. DESTINATION – The destination directory where the source data will be copied or synchronized.Specify the path to the source data here. SOURCE – This is the source directory or file you want to copy or synchronize.– This is the section where you can include rsync options.The basic syntax of an rsync command is as follows: rsync SOURCE DESTINATION You will see detailed information about each option and parameter. -P or –partial –progress – Keep partially transferred files and show progress.įor a comprehensive list of all available rsync options, run the following command: man rsync.–bwlimit=RATE – Limit the bandwidth to increase network efficiency.-e or –rsh=COMMAND – Specify which remote shell to use.–stats – Provides file transfer stats after it is complete.–progress – Show progress during the transfer.-i or –itemize-changes – Output a list of changes made during the transfer.-h or –human-readable – Output numbers in a human-readable format.-u or –update – Skip files on the destination side that are newer than the source files so only older files are updated.–temp-dir – Specify a directory to store temporary files.–dry-run – Perform a trial run without making any actual changes.-s or –sparse – Generate a summary of synchronized files and directories, including sparse files, after a sync operation. ![]() -z or –compress – Compress file data during the transfer to reduce bandwidth usage.–include=PATTERN – Include files or directories matching the specified pattern.–exclude=PATTERN – Exclude files or directories matching the specified pattern.–delete – Delete excluded files from the destination directory.-r or –recursive – Recursively copy directories.-a or –archive – Archive mode, which includes recursive copying and preserving file permissions, timestamps, symbolic links, and device files.-v or –verbose – Increase verbosity, providing more detailed output during the transfer.Rsync has numerous command line options, parameters, and configuration files to tailor its behavior. This section will explore various rsync options and basic syntax for different purposes. It preserves file attributes and supports secure transfers over SSH, making it suitable for both local and remote file transfers. Rsync also has robust features for transferring files to a backup server and mirroring tasks. This approach drastically reduces bandwidth usage and speeds up transfers. Unlike traditional copy commands, rsync uses a delta-transfer algorithm to only transmit the differences between the source and destination files. Rsync is a powerful and versatile Linux command for transferring and synchronizing files between local and remote devices.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |