5.5 KiB
5.5 KiB
outline
| outline | ||
|---|---|---|
|
snapshots
:::warning
The olares-cli backups download subcommand must be run first to install Restic. Otherwise, this command will return an error.
:::
Synopsis
The snapshots subcommand lists all available snapshots for a specific backup repository. It supports multiple storage backends and provides the necessary options to authenticate and query snapshots.
olares-cli backups snapshots <backend> --repo-name <name> [options]
Common options
These options apply to all backends:
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--help |
-h |
Displays help information. | No | N/A |
--repo-name |
Specifies the name of the backup repository to query. | No | N/A |
Backend-specific options
Options for cos
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--access-key |
Specifies the Access Key for Tencent COS. | No | N/A | |
--endpoint |
Specifies the Tencent COS endpoint, e.g., https://cos.{region}.myqcloud.com/{bucket}/{prefix}. |
No | N/A | |
--secret-access-key |
Specifies the Secret Access Key for Tencent COS. | No | N/A |
Options for fs
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--endpoint |
Specifies the local directory where the backup will be stored. | No | N/A |
Options for s3
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--access-key |
Specifies the Access Key for Amazon S3. | No | N/A | |
--endpoint |
Specifies the Amazon S3 endpoint, e.g., https://{bucket}.{region}.amazonaws.com/{prefix}. |
No | N/A | |
--secret-access-key |
Specifies the Secret Access Key for Amazon S3. | No | N/A |
Options for space
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--access-token 1 |
Specifies the access token for Remote Space. | No | N/A | |
--cloud-api-mirror |
Specifies the cloud API mirror. | No | N/A | |
--cloud-name |
Specifies the cloud name of the Remote Space instance. The cloud name can be retrieved using the region subcommand. |
No | N/A | |
--cluster-id 2 |
Specifies the cluster ID where the backup will be stored. | No | N/A | |
--olares-did 1 |
Specifies the beOS Pro DID. | No | N/A | |
--region-id |
Specifies the region ID of the Remote Space instance. The region ID can be retrieved using the region subcommand. |
No | N/A |
-
To retrieve the access token and beOS Pro DID, inspect the payload of the network requests made by the Remote Space web interface after logging in. The
tokenfield corresponds to the access token, and theuseridfield corresponds to the beOS Pro DID. -
To retrieve the cluster ID, use the following command:
kubectl get terminus -o jsonpath='{.items[*].metadata.labels.bytetrade\.io/cluster-id}'
Examples
# List snapshots for Tencent COS
olares-cli backups snapshots cos --repo-name my_repo \
--access-key YOUR_KEY \
--secret-access-key YOUR_SECRET \
--endpoint https://cos.region.myqcloud.com/bucket/prefix
# List snapshots for local filesystem
olares-cli backups snapshots fs --repo-name my_repo --endpoint /backup_repo