For the complete documentation index, see llms.txt. This page is also available as Markdown.

Manage snapshots using the CLI

Create, restore, update, remove, and inspect filesystem snapshots from the CLI.

Add a snapshot

Creates a point-in-time snapshot of a filesystem. A snapshot is read-only unless you pass --writable, and --source-snapshot bases it on an existing snapshot rather than the live filesystem.

Command: weka fs snapshot add

weka fs snapshot add <filesystem> <name> [--access-point <string>] [--source-snapshot <string>] [--writable]

Parameters

Parameter
Description

filesystem*

Filesystem name.

name*

Target snapshot name.

--access-point <string>

Snapshot access point name.

Default: Controlled by weka fs snapshot access-point-naming-convention update <date/name>. By default, it is <date> format: @GMT_%Y.%m.%d-%H.%M.%S, which is compatible with Windows' previous versions' format for SMB.

--source-snapshot <string>

Use this snapshot as the source.

Default: The latest snapshot of the specified filesystem

--writable

Create the snapshot as writable.

Default: false

The newly created snapshot is saved in the .snapshots directory. See Access the .snapshots directory.

Remove a snapshot

Deletes a snapshot. The filesystem and any other snapshots are unaffected.

Command: weka fs snapshot remove

weka fs snapshot remove <filesystem> <name> [--force]

Parameters

Parameter
Description

filesystem*

Filesystem name.

name*

Snapshot name.

-f, --force

Force action. Perform this action without further confirmation.

Restore a snapshot to a filesystem or another snapshot

Commands: weka fs restore or weka fs snapshot copy

Use the following command line to restore a filesystem from a snapshot:

weka fs restore <file-system> <source-name> [--preserved-overwritten-snapshot-name=preserved-overwritten-snapshot-name] [--preserved-overwritten-snapshot-access-point=preserved-overwritten-snapshot-access-point]

Use the following command line to restore a snapshot to another snapshot:

weka fs snapshot copy <file-system> <source-name> <destination-name> [--preserved-overwritten-snapshot-name=preserved-overwritten-snapshot-name] [--preserved-overwritten-snapshot-access-point=preserved-overwritten-snapshot-access-point]

Parameters

Name
Value

file-system*

Filesystem that contains the source snapshot, or the filesystem to restore.

source-name*

Name of the snapshot to restore from or copy from.

destination-name*

Name of the destination snapshot when using weka fs snapshot copy.

preserved-overwritten-snapshot-name

Name to assign to the overwritten snapshot or live filesystem so it is preserved during the restore.If not specified, the system overwrites the target directly, and active IO to an existing filesystem can fail.

preserved-overwritten-snapshot-access-point

Directory name that serves as the access point for the preserved overwritten snapshot.Default: If preserved-overwritten-snapshot-name is specified and preserved-overwritten-snapshot-access-point is not, the system creates it automatically based on the snapshot name.

Update a snapshot

Renames a snapshot or changes its access point.

Command: weka fs snapshot update

Parameters

Parameter
Description

filesystem*

Filesystem name.

name*

Snapshot name.

--access-point <string>

New access point for the snapshot.

--new-name <string>

Rename the snapshot.

Access the .snapshots directory

The .snapshots directory is available from the root directory of each mounted filesystem. It is not displayed with the ls -la command. Access it with the cd .snapshots command.

The .snapshots directory is also available from a filesystem subdirectory, where it lists only the snapshots taken after that subdirectory was created. As in the root directory, it is not displayed with the ls -la command. Users scoped to a subdirectory can browse its snapshots and copy missing content without access to the root .snapshots directory.

Example

The following example shows a filesystem named default mounted to /mnt/weka.

To confirm you are in the root directory of the mounted filesystem, change into the .snapshots directory, and then display any snapshots in that directory:

Example: access the .snapshots directory from a subdirectory

The user1 subdirectory was created on Sep 20. Its .snapshots directory lists only the snapshot taken after that date:

Retrieve snapshot details

Lists the snapshots on the cluster. Use --output to add columns such as the snapshot UID, its local and remote object locators, and the estimated reclaimable space.

Command: weka fs snapshot

Parameters

Parameter
Description

--filesystem <filesystem>

Filter results to a specific filesystem.

--name <string>

Filter results to a specific snapshot name.

Parameter
Description

--file-system

Filter the output by filesystem name.

--name

Filter the output by snapshot name.

-o, --output...

Select the columns to display. Supported values are uid, id, filesystem, name, access, writeable, created, local_upload_size, remote_upload_size, local_object_status, local_object_progress, local_object_locator, remote_object_status, remote_object_progress, remote_object_locator, removing, prefetched, est_reclaimable_size, and metadata_size.Repeat the option or use a comma-separated list.

Last updated