| Watch Folders and the Aspera Watch Service |
216
Create a new subscription to a watch
# /opt/aspera/bin/aswatchadmin subscribe
daemon
filepath
[
options
]
Options include:
--db-spec=
type
:
host
:
port
Use the specified Redis database, which is defined with the syntax
redis:
ip_address
:
port
[:
domain
]
.
-L, --logdir=
log_dir
Specify the location for watch logging, particularly if the user does not have access to the default
log location (
/var/log/messages
) or the location specified in
aspera.conf
.
--scan-period=
seconds
The time between file system scans of the watches (from end of one to start of the next). These
scans are independent of the snapshot minimum interval and snapshot minimum changes to ensure
that changes are identified. To never scan (asperawatchd relies entirely on file notifications), set to
"infinite".
On file systems without file notifications, such as object storage, mounted storage (NFS), Solaris,
AIX, and Isilon, file system scans triggered by the scan period are used to detect file changes. In
this case, set the scan period to frequently scan for changes. On operating systems that support file
notifications (Linux, Windows, macOS), asperawatchd uses the file notifications as the primary
means for detecting changes, and the scan period serves as a backup. In this case, the default value
of 30 minutes is usually acceptable and no change is necessary. To never scan, and rely entirely on
file notifications, set to
infinite
.
-x, --expire_in=
seconds
How long the watch subscription lasts before being removed from the database, with a default of
86400 seconds (24 hours). Users can resubscribe to a watch before the expiration period. Once a
watch subscription expires, a new subscription must be created.
Command line options override settings in
aspera.conf
.
List subscriptions for a specific daemon
# /opt/aspera/bin/aswatchadmin query-subscriptions
daemon
The output includes the subscription IDs, which are used to unsubscribe and resubscribe to the specific watch.
Unsubscribe from a watch
# /opt/aspera/bin/aswatchadmin unsubscribe
daemon
subscription_id
Resubscribe to a watch
# /opt/aspera/bin/aswatchadmin resubscribe
daemon
subscription_id
Transferring and Deleting Files with the Aspera Watch Service
When used in conjunction with
ascp
commands, the Aspera Watch Service (
asperawatchd
) allows for fast
detection and sending of new and deleted items. By comparing snapshots of the file directory it is watching,
asperawatchd
generates file lists for
ascp
transfers.
Prerequisites
To generate snapshots and file lists, configure and start
asperawatchd
.