Running async |
This topic covers async command-line options, including definitions, allowable values, and defaults. async can be run as a direct replacement for uni-directional, rsync-style replications (push or pull directions), or for bi-directional synchronization. Basic usage is as follows:
Example: Linux to Linux $ async -N TestBackup -d /tmp/dir -r user@server:/tmp/dir -w passwd -K bidi -a fair -l 30000
Example: Linux to Windows $ async -N TestBackup -d /tmp/dir -r user@server:c:/tmp/dir -w passwd -K bidi -a fair -l 30000
> async [instance_options] -N pair -d ldir -r [user@host:path] [session_options] ...
Example: Windows to Windows > async -N TestBackup -d c:/tmp/dir -r user@server:d:/tmp/dir -w passwd -K bidi -a fair -l 30000
Example: Windows to Linux > async -N TestBackup -d c:/tmp/dir -r user@server:/tmp/dir -w passwd -K bidi -a fair -l 30000
The session option -N is required; this is a name that uniquely identifies the async session. -N must follow any instance options and must precede all session arguments. For example:
async -L c:/mylogs -N session1 -d c:/data -r root@paris:d:/data
The required pair parameter names the synchronization session, which appears in Aspera Console, while the ldir parameter specifies the local directory to be synchronized. These options are followed by the user's login credentials at the remote endpoint, as well as the path that specifies the remote directory to be synchronized. If the mode of synchronization is push, then the contents of ldir will be synchronized to path, with the ldir content overwriting the path content, by default (unless the overwrite options are specified otherwise, e.g. to only overwrite if newer, or never overwrite). If the synchronization mode is pull, then the contents of path will be synchronized to ldir. If the mode is bidi (bi-directional), then the contents of ldir will be synchronized to path, with the newer versions of files and directories overwriting older versions, by default. As demonstrated by the example above, async has a variety of session options that enable you to control synchronization performance, as well as for indicating fasp transfer parameters. The following table is a complete command-line options reference. You can also display an abbreviated version from the command line by entering async -h.
Option (- Short form / -- Long form) | Description | Default Parameter |
---|---|---|
-A --version |
Display the async version information and license information. | |
-h --help |
Display help for command-line options. | |
-D[D..] |
Debug level | 0 |
-q --quiet |
Disable progress display. | |
-L localdir --alt-logdir=localdir |
Specify a logging directory on the local host. If the directory doesn't exist, async creates it for you. | |
--watchd=datastore:host:port |
Use asperawatchd connected to the specified Redis for
the transfer session. For example:
--watchd=redis:localhost:31415 |
redis is the only accepted datastore for this option. |
--apply-local-docroot |
Prepend the local docroot to the local directory. |
Option (- Short form / -- Long form) | Description | Default Parameter |
---|---|---|
-N pair --name=pair |
Name for the synchronization pair, which can be any string used to identify
the connection. This value is also be stored within the session cookie and can
be used in Aspera Console to identify the transfer session's name. The option
pair can contain only ASCII alphanumeric, hyphen, and
underscore characters. Note: -N must precede any combination
of the options below.
|
o |
-d ldir --local-dir=ldir |
Set the local sync directory to ldir. Note that you can use the --create-dir option (described below) to create the remote directory if it does not already exist. | |
-r rdir --remote-dir=rdir |
Set the remote sync directory to dir. Note that you can
use the --create-dir option (described below) to create the
remote directory if it does not already exist.
dir=[[user@]host:]path
CAUTION: For a local synchronization, do not specify a remote
(destination) directory that is located inside your source directory.
|
|
--host=host |
The name of the remote host. When host is specified with this option, the characters "@" and ":" are no longer treated specially in the argument to -r, so may appear in any such name. Note that if --host=host is specified, the remote-user name cannot be extracted from the argument to --remote-dir, and therefore must be supplied by a --user=name option or in the environment variable $user (on Windows, %USER%). Thus, allowed forms are as follows: --remote-dir user@host:/rootdir # (old method) --user user --remote-dir host:/rootdir --host host --user user --remote-dir /rootdir --remote-dir host:/rootdir # (uses $user) --host host --remote-dir /rootdir # (uses $user) The following means the same as the first three lines above: -r /rootdir --user=user --host=host For backward compatibility, -r A:/rootdir for any single letter A is still taken as a Windows path, not as --host A -r /rootdir. To specify a one-letter host name A, use an explicit --host=A. |
|
--user=user |
The name of the remote user. When --user=user is specified, the character "@" is no longer treated specially in the argument to -r, so may appear in any such name. | |
-w pass --pass=pass |
Set the passphrase string to the user's password. | |
-i file --private-key-path=file |
The SSH private key file. For information on creating a key pair, see Creating SSH Keys (Terminal). | |
--check-sshfp=fingerprint |
Compare fingerprint to remote host key hash, fail on mismatch. | |
-K direction --direction=direction |
Set the transfer direction. direction can be push, pull, or bidi (bi-directional). | push |
-k type --checksum=type |
Set the checksum type. type can be sha1, md5, sha1-sparse, md5-sparse, or none. A value of none is equivalent to a size and modification-time check only. | sha1-sparse |
-P port --tcp-port=port |
Set the TCP port for SSH. port must be valid numeric IP port. | 22 |
-O port --udp-port=policy |
Set the UDP port used by fasp for data transfer. | 33001 |
-a policy --rate-policy=policy |
Set the transfer rate policy. policycan be fixed, fair, high, or low. | fair |
-l rate --target-rate=rate |
Set the maximum transfer rate. rate=integer G/g, M/m, K/k, or bps. | 10,000 Kbps or 10 Mbps |
-m rate --min-rate=rate |
Set min transfer rate. rate=integer G/g, M/m, K/k, or just bps. | 200 Kbps |
-g size --read-block-size=size |
Set block size for reading. size=integer K, M, or just bytes. | 64 MB |
-G size --write-block-size=size |
Set block size using for writing. size=integer K, M, or just bytes. | 64 MB |
-H val --scan-intensity=val |
Set the intensity for scanning work. val can be one of vlow, low, medium, high, or vhigh. vlow minimizes system activity. vhigh maximizes system activity by continuously scanning files without rest. | medium |
-R remdir --remote-logdir=remdir |
Specify a logging directory on the remote host. | |
-Z mtu --datagram-size=mtu |
Specify the datagram size (mtu) as an integer. | By default, fasp uses the detected-path MTU. |
-X size --rexmsg-size=size |
Adjust the size (in bytes) of a retransmission request (Maximum: 1440). | |
-c cipher --cipher=cipher |
Set encryption algorithm. cipher can be none, AES128 | AES128 |
-b ldbdir --local-db-dir=ldbdir |
Local database directory. Note that you may relocate the snapshot database to a different location than the default one under the ldir specified with -d. This allows placing the database away from the main data files. This is useful for performance tuning. It is also useful when -d ldir is located on a network share volume that does not reliably support database locking. For further usage information, see Multiple Databases (Snap DB). | Default snapshot directory is ~private-asp at the root level of the synchronized directory. |
-B rdbdir --remote-db-dir=rdbdir |
Remote database directory. Similar to -b above, but for the remote database. For further usage information, see Multiple Databases (Snap DB). | Default snapshot directory is ~private-asp at the root level of the synchronized directory. |
-I file --include-from=file |
Scan paths identified in the filter file. | |
-E file --exclude-from=file |
Skip paths identified in the filter file. | |
--include=pattern |
Scan paths that match pattern. | |
--exclude=pattern |
Exclude paths that match pattern. | |
-n action --symbolic-links=action |
Treat symbolic links per the specified action. Permitted values are: copy - create (or update) the link at the destination. (Not valid for Windows source or destination.) skip - ignore the link altogether. follow - treat the link as if it were the file (or directory) it points to, so that at the destination, what was a link will now be a copy of the file (or directory). (Skip, if source is Windows.) Refer to Configuring Symbolic Links for more information on using symbolic links. |
skip |
-C --continuous |
Run continuous synchronization. If you receive an inotify error when attempting to run continuous synchronization, see Error Troubleshooting. | one-time |
-t --preserve-time |
Preserve file timestamps. | off |
--preserve-access-time |
Set the access time of the destination file to the same value as that of the source file. | off |
--preserve-modification-time |
Set the modification time of the destination file to the same value as that of the source file. | off |
--preserve-creation-time |
Set the creation time of the destination file to the same value as that of the source file. (Valid only on Windows.) | off |
-u --preserve-uid |
Preserve file owner's uid. This preserve option requires that async is running as root (for Linux) or Administrator (for Windows). | off |
-j --preserve-gid |
Preserve file owner's gid. This preserve option requires that async is running as root (for Linux) or Administrator (for Windows). | off |
--write-uid=uid |
Write files as the user uid. uid may be numeric, or by name. If by name, the name is looked up on the host actually performing the write. Failure to set the uid is logged, but is not an error. The uid is set after ascp completes and before moving the file from the staging directory to the final location. This option conflicts with --preserve-uid. | |
--write-gid=gid |
Write files as the group gid. gid may be numeric, or by name. If by name, name is looked up on host actually performing the write. Failure to set the gid is logged, but is not an error. gid is set after ascp completes and before moving the file from the staging directory to the final location. This option conflicts with --preserve-gid. | |
--scan-dir-rename |
Enable detection of renamed directories and files on the initial scan. Results are only relevant if the inodes for your file system are stable. | |
--scan-file-rename |
Enable detection of renamed files on the initial scan. Results are only relevant if the inodes for your file system are stable. | No scan for file renames and moves |
-o policy --overwrite=policy |
Set the overwrite policy. policy can be always,
older, or conflict. Use with -K push and
pull.
Note: You can easily resolve conflict and error situations in a
uni-directional sync by “touching” the problem files on the source and
running async with
--overwrite=always. This is designed to clear
allconflict and error states as the problem files
are synced.
Note:
--overwrite=older is only accurate if the user also
specifies --preserve-time (preserve
timestamps).
|
always for -K push and pull. conflict for -K bidi. |
-x --reset |
Clear the async snapshot database and rescan the synchronized directories and files to create a fresh snapshot. | off |
--assume-no-mods |
Only propagate create/delete/move. In other words, when running async in non-continuous mode, it does not scan a directory if the modification time is unchanged (compared to the current snapshot). | |
--ignore-delete |
Do not copy removals to the peer. This option is used mostly with uni-directional syncs. In bi-directional sync, a deletion on one side is ignored but the next time async is run, the file is recopied from the other end. In continuous mode, the file is not recopied until either async is restarted or the file is changed (touched). | |
--delete-delay |
Postpone actual deletion of files or directories until the end of the sync session. | |
--keep-dir-local=dir |
Move deleted files under dir. Note that dir must exist (it is not created by --create-dir), and must be outside the synchronization directory, but on the same file system. | |
--keep-dir-remote=dir |
Move the server's deleted files under dir. Note that dir must exist (it is not created by --create-dir), and must be outside the synchronization directory, but on the same file system. | |
--local-mount-signature=signature file |
Verify that the local file system is mounted by the existence of this
file. Note: Use of this feature will increase the time to synchronize
deletes.
|
|
--remote-mount-signature=signature file |
Verify that the remote file system is mounted by the existence of this
file. Note: Use of this feature will increase the time to synchronize
deletes.
|
|
--create-dir |
Create the remote directory if it does not exist. This option is used with the -d and -r options (async creates directories if they do not exist, rather than reporting an error and quitting). | |
--dedup[=mode] |
If duplicate files are encountered, take the action specified by mode, which can be hardlink or copy. In either mode, only a single copy of duplicate files is transferred. With --dedup=hardlink, the files are then replicated at the destination by means of hardlinks. With --dedup=copy, the files are replicated at the destination by copying. | create hardlinks |
--no-scan |
Skip initial scanning. | |
--cooloff=sec |
Number of seconds to delay the start of the transfer. For example, if --cooloff=5, async waits 5 seconds before copying a file. If --cooloff=0 transfers start immediately. Note that both peers get the same cooloff period. The permitted value for sec is any integer from 0 to 60; default=3. | 3 |
--pending-max=N |
This option acts as a buffer to ensure that files to be transferred do not exceed the maximum; default=2000. | |
--sharing-retry-max=N |
Maximum number of times to retry after a sharing violation. The interval between retries is the number of seconds specified by --cooloff. | 3 |
--preserve-acls=mode |
Preserve the ACL access data from Windows or OS X files if the preservation mode is native or metafile. If mode is native, async expects that the destination supports the same native ACL format as the source; if not, it generates an error and exits. If mode is metafile, async writes the access data to a separate file in the same location; the file has same name but with the added extension .aspera-meta. Metafile data is in a generic format that can reside on any platform and also be reconverted to native form if the file is again synced with a system that supports it. If mode is none, no ACL data is preserved at all. This feature is only meaningful if both hosts are in a common security domain. If a SID (security ID) in a source file does not exist at a destination, the sync proceeds but no ACL data is saved and the log records that the ACL could not be applied. |
No ACL data is preserved. |
--preserve-xattrs=mode |
Preserve OS X extended attributes data (xattr) if preservation mode is native or metafile. If the sync is run by a regular user, only user-level attributes are preserved. If run as superuser, all attributes are preserved. If mode is native, async expects that the destination supports the same native xattr format as the source; if not, it generates an error and exits. If mode is metafile, async writes the xattr data to a separate file in the same location; the file has the same name with the added extension .aspera-meta. The aspera-meta files are platform-independent and can be copied between hosts without loss of data. They can be reconverted to the native form if the file is again synced with an OS X system. If mode is none, no xattr data is preserved at all. |
No xattr data is preserved. |
--remote-preserve-acls=mode |
Like --preserve-acls but used when ACLs are stored in a different format on the remote host. Defaults to the value of --preserve-acls. | No ACL data is preserved. |
--remote-preserve-xattrs=mode |
Like --preserve-xattrs but used attributes are stored in a different format on the remote systgem. Defaults to the value of --preserve-xattrs. | No xattr data is preserved. |
--compression=mode |
Specify method used to compress a file before transfer. mode can be zlib or none. The default value is none. | |
--transfer-threads=N[:size] |
Specify intervals for dedicated transfer threads. N corresponds to the number of threads used to process files smaller or equal to the specified size. If no size is specified, infinity is used as an upper bound. | |
--remove-after-transfer |
Remove source files after they are successfully synchronized. | |
--scan-interval=duration |
Enable periodic scans. duration defines the interval between periodic scans. duration may be specified as DDd HH:MM:SS.mmm or NNw NNd NNh NNm NNs NNms NNus. Leading zero fields may be omitted. Spaces may be omitted. A plain number NN will be interpreted as NNs (seconds). Can only be used with continuous mode. |