Manage Snap-To-Object using the CLI
The Snap-To-Object feature enables the committing of all the data of a specific snapshot to an object store.
Using the CLI, you can:
Upload a snapshot
Command: weka fs snapshot upload
Use the following command line to upload an existing snapshot:
weka fs snapshot upload <file-system> <snapshot> [--site site]
Parameters
file-system*
Filesystem name.
snapshot*
Snapshot name of the <file-system> filesystem to upload.
site*
Location for the snapshot upload.
Mandatory only if both local and remote buckets are attached.
Possible values: local or remote
Default: Auto-selected if only one bucket for upload is attached.
Create a filesystem from a local uploaded snapshot
Command: weka fs download
Create or recreate a filesystem from a snapshot that is available in a local object store bucket. Use this procedure after a regular snapshot upload, or after you temporarily map a remote snapshot bucket as local during recovery. If the snapshot exists only in a remote bucket, use Recover a filesystem from a remote-only snapshot. If the snapshot originates from an encrypted source, include the required KMS-related parameters:
weka fs download <name> <group-name> <total-capacity> <ssd-capacity> <obs-bucket> <locator> [--auth-required auth-required] [--additional-obs additional-obs] [--snapshot-name snapshot-name] [--access-point access-point] [--kms-key-identifier kms-key-identifier] [--kms-namespace kms-namespace] [--kms-role-id kms-role-id] [--kms-secret-id kms-secret-id] [--skip-resource-validation]
When creating a filesystem from a snapshot, a background cluster task automatically prefetches its metadata, providing better latency for metadata queries.
Parameters
name*
Name of the filesystem to create.
group-name*
Name of the filesystem group in which the new filesystem is placed.
total-capacity*
The total capacity of the downloaded filesystem.
ssd-capacity*
SSD capacity of the downloaded filesystem.
obs-bucket*
Object store name for tiering.
locator*
Object store locator obtained from a previously successful snapshot upload.
auth-required
Require authentication for the mounting user when mounting this filesystem. This setting is only applicable in the root organization; users in non-root organizations must always be authenticated to perform a mount operation. Format: yes or no.
Default: no
additional-obs
An additional object-store name.
If the data to recover reside in two object stores (a second object store attached to the filesystem, and the filesystem has not undergone full migration), this object store is attached in a read-only mode.
The snapshot locator must be in the primary object store specified in the obs parameter.
snapshot-name
The downloaded snapshot name. Default: The uploaded snapshot name.
access-point
The downloaded snapshot access point. Default: The uploaded access point.
kms-key-identifier
Customize KMS key name for this filesystem (applicable only for HashiCorp Vault).
kms-namespace
Customize the KMS role ID for this filesystem (applicable only for HashiCorp Vault).
kms-role-id
Customize the KMS role ID for this filesystem (applicable only for HashiCorp Vault).
kms-secret-id
Customize the KMS secret ID for this filesystem (applicable only for HashiCorp Vault).
skip-resource-validation
Skip verifying RAM and SSD resource allocation for the downloaded filesystem on the cluster.
The locator can be a previously saved locator for disaster scenarios, or you can obtain the locator using the weka fs snapshot command on a system with a live filesystem with snapshots.
If you need to pause and resume the download process, use the command: weka cluster task pause / resume. To abort the download process, delete the downloaded filesystem directly. For details, see .
Manage synchronous snapshots
The workflow to manage the synchronous snapshots includes:
Upload snapshots using, for example, the snapshots scheduler.
Download the synchronous snapshot (described below).
Restore a specific snapshot to a filesystem. See
Related topics
Restore a snapshot to a filesystem or another snapshot
Download a synchronous snapshot
Command: weka fs snapshot download
Use the following command line to download a synchronous snapshot. This command is only relevant for snapshots uploaded from a system of version 4.3 and later:
weka fs snapshot download <file-system> <locator>
Make sure to download synchronous snapshots in chronological order. Non-chronological snapshots are inefficient and are not synchronous.
If you need to download a snapshot earlier than the latest downloaded one, for example, when you need one of the daily synchronous snapshots after the weekly synchronous snapshot was downloaded, add the --allow-non-chronological flag to download it anyway.
Parameters
file-system*
Name of the filesystem.
locator*
Object store locator obtained from a previously successful snapshot upload.
If you need to pause and resume the download process, use the command: weka cluster task pause / resume. To abort the download process, delete the downloaded snapshot directly.
Related topics
Recover a filesystem from a remote-only snapshot
Recover a filesystem when the required snapshot exists only in a remote object store bucket. This workflow differs from the local download workflow in one step. You still use weka fs download to create the filesystem, but you first create a temporary local bucket definition that points to the remote snapshot bucket.
Before you begin
Identify the remote bucket endpoint, bucket name, region, and credentials.
Use object store credentials that can read and write the bucket. For example, use an S3 user with a
readwritepolicy.Ensure the WEKA cluster has network connectivity to the remote object store.
Identify the filesystem group, capacities, and snapshot locator.
Verify sufficient licensing for the new filesystem capacity.
Procedure
Add a temporary local bucket definition that points to the remote snapshot bucket:
Use the bucket that contains the uploaded snapshot. The
recovery-bucket-namevalue is the WEKA OBS connection name. Use this name in laterattachanddetachcommands. If the endpoint is another WEKA system that uses a self-signed certificate, set--protocol HTTPS_UNVERIFIED.Create the filesystem from the snapshot:
If the recovered filesystem needs a writable tiering bucket, add it and attach it:
Detach the temporary recovery bucket from the recovered filesystem:
If the CLI asks for confirmation, rerun the command with
-f.If the filesystem also needs a remote backup bucket, create the bucket definition and attach it in remote mode:
Delete the temporary recovery bucket definition when recovery is complete:
If the delete command reports that the bucket is still in use, wait a few seconds and retry.
Related topic
Last updated