Managing Watch subscriptions
The Aspera Watch Service can watch the entire area of the file system to which the user has access. Individual watches are created by subscribing to the service and specifying a portion of the file system to watch. Each subscription can specify a scan period, database, and subscription expiration. When subscriptions overlap in the file system, the shortest scan period is used to scan the shared area.
Watch subscriptions are managed by using the aswatchadmin command line utility.
Create subscription to a watch
$ /Library/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 (homedir/Library/Logs/Aspera/) or the location that is 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), and AIX 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 it gets 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
$ /Library/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
$ /Library/Aspera/bin/aswatchadmin unsubscribe daemon subscription_id
Resubscribe to a watch
$ /Library/Aspera/bin/aswatchadmin resubscribe daemon subscription_id