Running async |
Typical rsync usage examples for uni-directional replication and async functional equivalent commands.
This section includes typical rsync usage examples for uni-directional replication, as well as the functionally equivalent async command.
If you do not include a drive letter in your path when syncing with a Windows machine, async will report the following error message: "Failed. Peer error: Remote directory is not absolute." Thus, remember to always include a drive letter in your Windows paths.
You can synchronize between a Windows endpoint and a Windows server, as well as between a Windows endpoint and a Linux server. In async, the path separator "/" works equally well on Windows and other platforms. The path separator "\" is platform-agnostic only for the options -d/r/L/R/B/b and --keep-dir-local/remote. In filtering rules, however, "\" is exclusively a quoting operator and "/" is the only path separator recognized. The examples below use "/" uniformly.
Example 1
Requirements:
rsync command:
> rsync --stats -v -r -u -l -t -o -g -p c:\media\ editor@docserver:d:\backups\media
async equivalent:
> async -N Oneway -u -t -j -d c:/media/ -r editor@docserver:d:/backups/media -l 100M -w d0c5 -K push -c none
Example 2
Requirements:
rsync command:
> rsync --stats -v -r -u -l -t -o -g -p c:\media\ --include="\media" --include="\media\wmv\" --exclude="\media\.*" editor@docserver:d:\backups\media
async equivalent:
> async -N Oneway -u -t -j -d c:/media/ --include="/media" --include="/media/wmv" --exclude="/media/.*" -r editor@docserver:d:/backups/media -w d0c5 -K push -c none
Options Comparison Table
rsync Option | async Option | Description |
---|---|---|
--stats | Enabled, by default (i.e., not quiet) | File transfer stats |
-v, --verbose | Enabled, by default | Increase verbosity |
-q, --quiet | -q, --quiet | Disable progress display |
-r, --recursive | Enabled, by default | Recurse into directories |
-u, --update | If a file exists at the destination with the same name, then async's default behavior is to do nothing if the files are the same (size and checksum), and overwrite if the file is different. | Skip files that are newer on the receiver |
-l, --links | -n COPY, --symbolic-links=COPY (default) | Copy symlinks as symlinks |
-t, --times | -t, --preserve-time (must have ES, CS or P2P 3.1+ installed) | Preserve modification times |
-o, --owner | -u, --preserve-uid | Preserve owner |
-g, --group | -j, --preserve-gid | Preserve group |
-p, --perms | With regard to directory attributes, if the source mode doesn't have sufficient owner permissions, then the destination will add: owner rwx. | Preserve permissions |
--version | -A, --version | Print version number |
-h, --help | -h, --help | Show help |
--include-from=FILE | -I, --include-from=FILE | Include filter (text file with paths for inclusion). See Include/Exclude Filtering Rules. |
--exclude-from=FILE | -E,--exclude-from=FILE | Exclude filter (text file with paths for exclusions). See Include/Exclude Filtering Rules. |
--include=PATTERN | --include=PATTERN | Include paths that match PATTERN. See Include/Exclude Filtering Rules. |
--exclude=PATTERN | --exclude=PATTERN | Skip paths that match PATTERN. See Include/Exclude Filtering Rules. |
-c none | rsync, as a protocol, does not encrypt on its own; however, rsync can enable/disable the SSH encryption protocol (using option -e ssh). |