Skip to main content

Managing Remote Server Mounts

As an administrator, you can manage Remote Server Mounts within your Files.com site using the CLI App.

Listing All Remote Server Mounts

files-cli behaviors list --filter-by="behavior=remote_server_mount"

Creating a Remote Server Mount

First, you'll need the ID of the Remote server which can be found using this command:

files-cli remote-servers list

Then you can configure the Remote Server Mount using this command:

files-cli behaviors create --path "path/to/folder" --behavior "remote_server_mount" --value '{ "remote_server_id": <ID>, "remote_path": "/remote/server/path/to/remote/folder" }'

In the above command, replace <ID> with the ID found with the previous list command.

Updating a Remote Server Mount

Find the mount's behavior ID with files-cli behaviors list --filter-by="behavior=remote_server_mount". This is different from the Remote Server ID returned by files-cli remote-servers list.

Use the behavior ID to choose the mount to update, and the Remote Server ID in its value. In this example, 12345 is the behavior ID and 6789 is the Remote Server ID:

files-cli behaviors update --id 12345 --value '{ "remote_server_id": 6789, "remote_path": "/updated/path/to/remote/folder" }'

Deleting a Remote Server Mount

files-cli behaviors delete --id=12345