| Watch Folders and the Aspera Watch Service |
169
Field
Description
Default
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
.
For pull Watch Folders, file systems scans that are triggered by
scan_period are the sole means for detecting changes in the source
directory.
Lower scan periods detect changes faster but can result in greater resource
consumption, particularly for object storage.
Note:
The value for scan period cannot be empty, otherwise the
configuration is rejected.
Save the configuration file. The path to the configuration file is used in the next step.
5.
Create the Watch Folder.
# /opt/aspera/bin/aswatchfolderadmin create-folder
daemon
-f
json_file
Where
daemon
is the user that is running the Watch Folder services and
json_file
is the path to the Watch Folder
configuration file. If you do not know the daemon, retrieve a list of running daemons by running the following
command:
# /opt/aspera/bin/aswatchfolderadmin query-daemons
[aswatchfolderadmin query-daemons] Found a single daemon:
root
Daemons have the same name as the user for which they are running. For example, if you used the root user to run
your services, you should see the root daemon listed.
For example, using the root daemon and a valid JSON file,
watchfolderconf.json
, the output of the
aswatchfolderadmin
command should look like the following:
# /opt/aspera/bin/aswatchfolderadmin create-folder root -f
watchfolder_conf.json
[aswatchfolderadmin create-folder]
Successfully created instance b394d0ee-1cda-4f0d-b785-efdc6496c585.
If
aswatchfolderadmin
returns
err=28672
, confirm that the user's docroot allows access to the source
directory. If you need to make changes to your docroot, see
Updating the Docroot or Restriction of a Running
on page 210.
If
aswatchfolderadmin
returns
err=2
, a Watch Service is not running for the user. See the previous section
for instructions on starting a Watch Service.
6.
Verify that the Watch Folder is running.
To retrieve a list of running Watch Folders, run the following command:
# /opt/aspera/bin/aswatchfolderadmin query-folders
daemon_name
For example:
# /opt/aspera/bin/aswatchfolderadmin query-folders root