Aspera 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 Aspera 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).
Aspera Sync reads the remote host's aspera.conf file to
determine whether or not to use asperawatchd for the session. To pull files, start
a Aspera 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 Aspera 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 running the NFS server, but neither the local host nor the remote host need to be configured.
On the NFS server, you must also set the Redis database to a non-loopback address by configuring Redis with a modified configuration file including 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 Aspera Sync session from any client mounting NFS storage from that NFS server.
Start a Aspera 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 Aspera Sync session. The asperawatchd service on Host B (10.54.44.194) scans the /data/D1 directory mounted by Host A and passes the snapshot to Aspera Sync. Aspera 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.