Skip to content

VALDI CLI

The VALDI CLI is in alpha and may be unstable. If you encounter any bugs (or if you have particular feature requests or comments), please submit an issue on GitHub or contact VALDI support.

At this time, the VALDI CLI can only be used to mount and unmount detachable storage volumes on any of your VALDI virtual machines. This allows you to seamlessly migrate and share data amongst an unlimited number of devices.

Over time, many additional features will be added to the CLI, ultimately enabling you to fully manage all VALDI cloud resources from the command line. Please consider starring or watching the repository to keep up with any new releases. We also encourage you to contribute through pull requests.

Usage

After you install VALDI CLI, you can use it to mount and unmount your detachable storage volumes (and eventually, much more!). This section presents the command and subcommand options available in valdi.

usage: valdi [-h] service ...

positional arguments:
  service
    volume    Manage detachable volumes
    init      Initialize VALDI CLI

optional arguments:
  -h, --help  show this help message and exit

Initialization

As noted in the installation instructions, you must first run valdi init to initialize the CLI tool before running other commands.

Volumes

usage: valdi volume [-h] command ...

positional arguments:
  command
    mount     Mount a detachable volume
    unmount   Unmount a detachable volume

optional arguments:
  -h, --help  show this help message and exit

Mounting a volume

To mount a volume, use the command:

valdi volume mount <volume_name> <mountpoint>

The mountpoint must be a full path to the directory where you would like to mount your volume (e.g., ~/mnt). If the specified directory does not exist, the CLI will create it. If the directory exists and is not empty, the files currently in the directory will be hidden and inaccessible until the volume is unmounted. No data will be lost.

Note that you can mount subdirectories of volumes directly, as well. For example, if you have a volume called my-volume within which is a subdirectory my-subdir, you can mount my-subdir directly with the following command:

valdi volume mount my-volume/my-subdir ~/mnt

The first time you mount a volume or subdirectory, you will be prompted for your Access Key and Secret Access Key, which were provided to you upon creation of the volume. All subdirectories of volumes use the same credentials. Subsequent mounts on the same device will not require you to enter the credentials again.

Unmounting a volume

To unmount a volume, use the command:

valdi volume unmount <mountpoint>

For example, if one of your volumes is mounted at ~/mnt, unmount it with the following command:

valdi volume unmount ~/mnt

Uploading and downloading data

The CLI will soon support uploading and downloading data directly. For now, you can mount a volume to one of your VMs using the CLI, and then upload data from your local host directly to the mounted volume using scp (or download data from the volume to your local host).

For example, if you wanted to upload the contents of a local directory ~/sample-data to a detachable volume mounted at ~/mnt on a VM with IP address 217.79.242.232 and ssh access configured through port 60014, you could use the following command:

scp -P 60014 -r ~/sample-data user@217.79.242.232:~/mnt