| Watch Folders and the Aspera Watch Service |
213
or for Linux systems that use
init.d
:
# service asperanoded restart
2.
Ensure the user has permissions to write to the default log directory if no directory is specified.
For more information about configuring log directories, see
on page 213.
3.
Configure Watch Service settings.
Though the default values are already optimized for most users, you can also configure the snapshot database,
snapshot frequency, and logging. For instructions, see
on page 213.
4.
Start a Watch Service under the user.
The following command adds the Watch Service run under the user to the Aspera Run Service database:
# /opt/aspera/sbin/asperawatchd --user
username
[
options
]
5.
Verify that the Watch Service daemon is running under the user.
Use the
aswatchadmin
utility to retrieve a list of running daemons. Daemons are named for the user who runs
the service. For example, if you started a Watch Service under root, you should see the root daemon listed when
you run the following command:
# /opt/aspera/bin/aswatchadmin query-daemons
[aswatchadmin query-daemons] Found a single daemon:
root
6.
Create a watch.
A watch is a path that is watched by the Aspera Watch Service. To create a watch, users subscribe to a Watch
Service and specify the path to watch. run the following command, where
daemon
is the username used to start the
asperawatchd
service and
filepath
is the directory to watch:
# /opt/aspera/bin/aswatchadmin subscribe
daemon
filepath
When you create a new subscription, you can also set watch-specific logging, database, scan period, and
expiration period, and override
aspera.conf
settings.
Note:
The default scan period is 30 minutes. If you are watching a file system that does not support file system
notifications (such as object storage, mounted storage (NFS), Solaris, AIX, and Isilon), Aspera recommends
setting a more frequent scan to detect file system changes quicker.
For more information on using these options, see
on page 215 or run:
# /opt/aspera/bin/aswatchadmin subscribe -h
Note:
The default expiration for watches is 24 hours. If a watch subscription expires before the user resubscribes
to it, a new subscription must be created.
Watch Service Configuration
The Aspera Watch Service configuration in the
<server>
section of
aspera.conf
includes the snapshot
database, snapshot frequency, and logging:
<server>
<rund>...</rund>
<watch>
<log_level>log</log_level>
<log_directory>AS_NULL</log_directory>
<db_spec>redis:
host
:31415:
domain
</db_spec>
<watchd>
<max_directories>1000000</max_directories>
<max_snapshots>10000</max_snapshots>