| Watch Folders and the Aspera Watch Service |
193
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 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
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.
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