Examples of async commands and output

Examples of common Sync use cases and a description of async output.

Async command examples

  1. Continuous synchronization of a daily archive of large files on a Windows computer to Linux computer, preserving Windows ACLs, run as an async pull on the Linux computer:
    $ async -L /sync/logs -N backup -d /sync/backup -r alligator@everglades.company.com:"C:\data\" -i /.ssh/lion_private_key -K pull --remote-scan-interval=4h --preserve-acls=metafile --remote-preserve-acles=metafile -C --exclude-dirs-older-than=1w0d0h0m0s

    Details:

    • Logs are stored on the Linux computer in the specified location.
    • The user, lion, authenticates with an SSH key by using the -i option.
    • Because the files in the backup are large, remote-scan-interval is used to scan the Windows computer every 4 hours, which force an extra scan in case any notifications are missed.
    • To preserve Windows ACLs in the backup, both preserve-acls=metafile and remote-preserve-acls=metafile must be specified.
    • Since the archive directory creates a new directory for each day, use exclude-dirs-older-than=1w0d0h0m0s to avoid scanning directories that are no longer changing (older than a week).
  2. High-performance push synchronization of many (10,000s) of small files (<10 KB) between Windows computers:
    > async -L c:/logs:200 -q -N small-files -c none --pending-max=10000 --preserve-acls=native --transfer-threads=4 -R c:/logs:200 -d c:/data/ -r bobcat@192.168.4.24:"C:\data\" -K push -l 500m

    Details:

    • Specifying the logging locations (-L and -R) is optional. Adding :200 to the end of the log directory value allows the logs to reach 200 MB before being rotated.
    • If the connection is secure, disabling encryption by using -c none might boost performance.
    • Increase the number of pending files from the default of 2000 using --pending-max=10000.
    • The --preserve-acls=native option preserves Windows ACLs.
    • Using more FASP threads to move the data can improve performance, set with --transfer-threads=4. The number of threads must not exceed the number of CPU cores (the lower value of the client and server computers).
    • The user must enter the password at the prompt because it is not provided in the command. Use SSH keys for authentication, even when it is not required.
  3. Noncontinuous bidirectional synchronization of directories that contains a mix of large and small files in which small files are synchronized by using one thread and large files use another, run on a Linux computer to a macOS computer:
    $ async -L /sync/logs -q -N sync-2017-01-01 -images --user=gazelle@company.com --host=10.4.25.10 -r Library/daimages -i /lion/.ssh/lion_private_key -R Library/sync/logs --transfer-threads=2:100000 -K bidi

    Details:

    • Logs are saved in the specified locations on both computers.
    • The user authenticates with an SSH key by using the -i option.
    • The user and host are specified as separate options, rather than as part of the destination folder, so that the username with an @ can be used (@ is reserved in an -r argument for specifying the host).
    • The async session uses two threads, one for files larger than 100 KB and one for files less than or equal to 100 KB, specified with the --transfer-threads option.
  4. Noncontinuous push synchronization through reverse IBM Aspera Proxy:
    $ async -N pushproxy -images -r lion@10.0.0.1:/daimages --proxy=dnats://gazelle:password@10.0.0.4 -K push

    Details:

    • The transfer username on the destination (10.0.0.1) is lion, the Proxy IP address is 10.0.0.4, and the Proxy username is gazelle.
    • The Proxy URL option must include the Proxy user's password.

Async output example

When async is run in interactive mode, the status of each file in the synchronized directory is displayed in a list similar to the following output:

/file1                        SYNCHRONIZED
/file2                        SYNCHRONIZED(exs)
/file3                        SYNCHRONIZED(skp)
/file4                        SYNCHRONIZED(del)

The status might be one of the following options:

  • SYNCHRONIZED: file transferred
  • SYNCHRONIZED(skp): File skipped.
  • SYNCHRONIZED(del): File deleted.
  • SYNCHRONIZED(ddp): Dedup (duplicate files present).
  • SYNCHRONIZED(exs): File exists.
  • SYNCHRONIZED(mov): File changed (renamed, moved, or different attributes).