Sync with Aspera Watch Service session examples
Examples of async commands for push, pull, and bidi sessions that use asperawatchd to identify files to transfer.
Push example
Configure and start asperawatchd on the local host to push files with asperawatchd (see Starting Aspera Watch Services and creating Watches).
To push files, start a Sync session with the --watchd datastore:host:port[:domain] option. For example,
async --watchd redis:localhost:31415:root -N watch_push -d /data/D1 -r adminuser@10.0.0.1:/data/R1
Pull example
Configure and start asperawatchd on the remote host to pull files with asperawatchd (see Starting Aspera Watch Services and creating Watches).
Sync reads the remote host's aspera.conf file to determine whether to use asperawatchd for the session. To pull files, start a Sync session with the -K pull option. For example,
async -N watch_pull -d /data/D1 -r adminuser@10.0.0.1:/data/R11 -K pull
Bidirectional example
Configure and start asperawatchd on the local and remote hosts to start a bidirectional session with asperawatchd (see Starting Aspera Watch Services and creating Watches).
To synchronize bidirectionally, start a Sync session with the --watchd datastore:host:port:domain option and the -K BIDI option. For example,
async --watchd redis:localhost:31415:root -N watch_session -d /data/D1 -r adminuser@10.0.0.1:/data/R11 -K BIDI
Remote from ascp example
If you are using CIFS or NFS mounted storage, you must configure and run asperawatchd service on the host that runs the NFS server, but both the local host and the distant host do not require configuration.
On the NFS server, you must also set the Redis database to a nonloopback address by configuring Redis with a modified configuration file that includes the correct port and host address bindings. For example, if your host address is 10.54.44.194:
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 31415
# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
bind 10.54.44.194
Save your configuration file and then run the asperaredisd service with the location of your configuration file.
# /opt/aspera/sbin/asperaredisd/filepath/redis_configuration.conf.
Point asperawatchd to the new Redis location by running the following command on your server:
# asconfigurator -x "set_node_data;watchfolderd_db_spec,redis:redis_host:redis_port:domain"
For example,
# asconfigurator -x "set_node_data;watchfolderd_db_spec,redis:10.54.44.194:31415:root"
Restart asperawatchd.
# /opt/aspera/bin/asperawatchd --user username
You can now start a Sync session from any client that mounts NFS storage from that NFS server.
Start a Sync session with the local directory (-d) pointing to the mounted storage and the --watchd option pointing to the remote Redis monitored by asperawatchd. For example,
async --watchd redis:10.54.44.194:31415 -N watch_remote -d /data/D1 -r adminuser@10.0.0.1:/data/R11 -K BIDI
In this example, the client on Host A starts the Sync session. The asperawatchd service on Host B (10.54.44.194) scans the /data/D1 directory that is mounted by Host A and passes the snapshot to Sync. Sync transfers the relevant files from the mounted storage to the target directory remote Host C® (10.0.0.1). In this example, only Host B needs to be configured for asperawatchd.
-C option. In continuous mode, any changes you make to a monitored directory are detected by Introduction to Watch Folders and the Aspera Watch Service. Changes are propagated through Aspera Sync.