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 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 need see the root daemon that is 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

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:
# /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 wanted changes, and then save the configuration as a JSON file. You cannot pass a new configuration file to the update-folder subcommand because the new configuration file must match the old file exactly, except for the changes you are making.
  1. 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
  2. Edit the configuration settings in the file.
    Note: When aswatchfolderadmin returns the JSON configuration, it obfuscates the password for the host with asterisks (******). If you do not want to update the password, leave it obfuscated (as asterisks) in the new file and the old password is used. To update the password, enter the new string. If no password is specified, then the password value is empty and transfers cannot be authenticated.
  3. Save your changes.
  4. 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