Managing Watch Folders with aswatchfolderadmin
The aswatchfolderadmin tool can be used to retrieve a list of Watch Folders, update the configuration of Watch Folder, and delete a Watch Folder.
Retrieve a List of Running Daemons
Use the aswatchadmin and
aswatchfolderadmin utilities to retrieve a list of
running daemons. Daemons usually 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 when you run the following
commands:
# /opt/aspera/bin/aswatchadmin query-daemons
[aswatchadmin query-daemons] Found a single daemon:
root
# /opt/aspera/bin/aswatchfolderadmin query-daemons
[aswatchfolderadmin query-daemons] Found a single daemon:
root
Note: Daemons for services that are started in the
GUI are named with the ID of the service, rather than the
user.
Retrieve a List of Watch Folders
# /opt/aspera/bin/aswatchfolderadmin query-folders daemon
For
example, if two Watch Folders are configured for the daemon root, the
output is similar to the
following:# /opt/aspera/bin/aswatchfolderadmin query-folders root
[aswatchfolderadmin query-folders] Found 2 watchfolders:
3354f360-dfa6-4789-930e-074cd9d4551b
b394d0ee-1cda-4f0d-b785-efdc6496c585
Update a Watch Folder's Configuration
To update a Watch Folder configuration, retrieve the Watch Folder's configuration, make the desired changes, and then save the configuration as a JSON file. You cannot pass a new configuration file to the update-folder sub-command, because the new configuration file must match the old file exactly, except for the changes you are making.- Retrieve and save the Watch Folder configuration in a new
file:
# /opt/aspera/bin/aswatchfolderadmin query-folders daemon -i watch_folder_id --config > filename.json
- Edit the configuration settings in the file.
- Save your changes.
- Submit the updated configuration file to
aswatchfolderadmin:
# /opt/aspera/bin/aswatchfolderadmin update-folder daemon watchfolder_id -f json_file
For example:
# /opt/aspera/bin/aswatchfolderadmin update-folder root 3354f360-dfa6-4789-930e-074cd9d4551b -f watchfolder_conf.json [aswatchfolderadmin update-folder] Successfully updated instance b394d0ee-1cda-4f0d-b785-efdc6496c585
Delete a Watch Folder
# /opt/aspera/bin/aswatchfolderadmin delete-folder daemon watchfolder_id
For
example:# /opt/aspera/bin/aswatchfolderadmin update-folder root 3354f360-dfa6-4789-930e-074cd9d4551b
[aswatchfolderadmin update-folder] Successfully deleted instance b394d0ee-1cda-4f0d-b785-efdc6496c585