Volumes, files and snapshots
Attach persistent volumes, work with the files on them, and snapshot them.
stackblaze volume
Alias: volumes
Extra persistent volumes mounted into the linked app. add attaches a new volume at an absolute mount path; names are lowercase letters, digits and dashes. delete detaches one and asks you to type its name unless -y.
stackblaze volume [list]
stackblaze volume add <name> --mount <path> [--size <qty>]
stackblaze volume delete <name> [-y]| Flag | Description |
|---|---|
--mount <path> | add: mount path inside the app (required) |
--size <qty> | add: size (default 5Gi) |
--name <name> | add: same as the positional name |
-y, --yes | delete: skip the confirmation |
Also accepts the scope flags (-p, --pipeline, --phase, -a, --app) and the output flags (-o, --output, --json), plus --token and --api-url. Common flags
Examples
stackblaze volume add data --mount /data --size 10Gi
stackblaze volume delete data -ystackblaze files
Works with files on the app's volume mounts through a running instance. mounts lists the paths you can use; download writes a tar archive; upload copies a local file, and extracts a tar archive when --path ends in / or with --extract (automatic for .tar and .tgz).
stackblaze files mounts
stackblaze files list --path <dir>
stackblaze files download --path <path> [--out <file>]
stackblaze files upload <local> --path <path> [--extract]
stackblaze files rename --from <path> --to <path>
stackblaze files delete --path <path> [-y]| Flag | Description |
|---|---|
--path <path> | Absolute path under a mount, e.g. /data |
--out <file> | download: local file to write (default <basename>.tar) |
--extract | upload: extract a tar archive at --path |
--from <path>, --to <path> | rename: source and destination |
--pod <name> | Instance to use (default: the app's main instance) |
--container <name> | Container to use (default: the web container) |
-y, --yes | delete: skip the confirmation |
Also accepts the scope flags (-p, --pipeline, --phase, -a, --app) and the output flags (-o, --output, --json), plus --token and --api-url. Common flags
Examples
stackblaze files mounts
stackblaze files list --path /data
stackblaze files download --path /data/uploads --out uploads.tar
stackblaze files upload ./seed.tgz --path /data/stackblaze snapshots
Alias: snapshot
create snapshots every volume of the app as one group. restore restores a whole group, or one volume from one snapshot, and asks for confirmation unless -y.
stackblaze snapshots list
stackblaze snapshots create [--group-id <id>]
stackblaze snapshots restore --group-id <id> [-y]
stackblaze snapshots restore --pvc-name <name> --snapshot-name <name> [-y]| Flag | Description |
|---|---|
--group-id <id> | create: group ID to use; restore: the group to restore |
--pvc-name <name> | restore: the volume to restore (single-volume restore) |
--snapshot-name <name> | restore: the snapshot to restore it from |
-y, --yes | restore: skip the confirmation |
Also accepts the scope flags (-p, --pipeline, --phase, -a, --app) and the output flags (-o, --output, --json), plus --token and --api-url. Common flags
Examples
stackblaze snapshots create --group-id before-migration
stackblaze snapshots restore --group-id before-migration -y