Skip to Content
CLI & APICommand reference

stackblaze files

Volume mount files (persistent PVC data)

Usage: stackblaze files [options] [command]

Volume mount files (persistent PVC data)

Options:
  -h, --help                 Print help

Commands:
  mounts [options]           List volume mount paths available for file access
  list|ls [options] [path]   List files under a path on a volume mount
  download [options] [path]  Download a file or directory as a tar archive
  upload [options] <local>   Upload a local file to a volume mount path
  delete [options] [path]    Delete a file or directory on a volume mount
  rename [options]           Rename or move a file on a volume mount
  help [command]             Print this message or the help of the given
                             subcommand(s)

May be disabled by your platform admin.

files mounts

Usage: stackblaze files mounts [options]

List volume mount paths available for file access

Options:
  --api-url <url>        StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>        API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>   Project name
  -e, --env <name>       Environment name (default: production)
  -a, --app <name>       App name
  --json                 Output JSON (same as -o json) (default: false)
  --pod <name>           Target pod (default: primary app pod)
  --container <name>     Target container (default: web)
  -o, --output <format>  Output format: text or json (choices: "text", "json")
  -h, --help             Print help

May be disabled by your platform admin.

Example

List the paths in the app's pod where you can read and write files: its volumes, plus /tmp.

stackblaze files mounts -p github-demo-cw8z -e dev -a hello-web
pod=hello-web-qw6y-web-59ffbdcb4-xckfx  container=web
/data/uploads  pvc=uploads  1Gi
  access: ReadWriteMany
/tmp

files list

Usage: stackblaze files list|ls [options] [path]

List files under a path on a volume mount

Options:
  --api-url <url>        StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>        API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>   Project name
  -e, --env <name>       Environment name (default: production)
  -a, --app <name>       App name
  --json                 Output JSON (same as -o json) (default: false)
  --path <path>          Absolute path under a mount, e.g. /data (or pass it
                         positionally)
  --pod <name>           Target pod
  --container <name>     Target container
  -o, --output <format>  Output format: text or json (choices: "text", "json")
  -h, --help             Print help

May be disabled by your platform admin.

Example

List a folder on the app's volume.

stackblaze files list /data/uploads/imports -p github-demo-cw8z -e dev -a hello-web
/data/uploads/imports  pod=hello-web-qw6y-web-59ffbdcb4-xckfx
f  customers.csv 22B

files download

Usage: stackblaze files download [options] [path]

Download a file or directory as a tar archive

Options:
  --api-url <url>       StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>       API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>  Project name
  -e, --env <name>      Environment name (default: production)
  -a, --app <name>      App name
  --json                Output JSON (same as -o json) (default: false)
  --path <path>         Absolute path to file or directory (or pass it
                        positionally)
  --out <file>          Local output path (default: <basename>.tar; -o <file>
                        also accepted)
  --pod <name>          Target pod
  --container <name>    Target container
  -h, --help            Print help

May be disabled by your platform admin.

Example

Download a folder from the app's volume as a tar archive, then look inside it.

stackblaze files download /data/uploads/imports --out imports-backup.tar -p github-demo-cw8z -e dev -a hello-web
tar tvf imports-backup.tar
OK Saved /data/uploads/imports → <current directory>/imports-backup.tar
Archive is tar format; extract with: tar xf imports-backup.tar
drwxr-xr-x nginx/nginx       0 2026-11-25 14:55 imports/
-rw-r--r-- nginx/nginx      22 2026-11-25 14:55 imports/customers-2026-11.csv

files upload

Usage: stackblaze files upload [options] <local>

Upload a local file to a volume mount path

Options:
  --api-url <url>        StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>        API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>   Project name
  -e, --env <name>       Environment name (default: production)
  -a, --app <name>       App name
  --json                 Output JSON (same as -o json) (default: false)
  --path <path>          Remote file path or directory (trailing / for tar
                         extract dir)
  --extract              Extract tar archive at --path (auto for .tar/.tgz)
  --pod <name>           Target pod
  --container <name>     Target container
  -o, --output <format>  Output format: text or json (choices: "text", "json")
  -h, --help             Print help

May be disabled by your platform admin.

Example

Upload a local file into a folder on the app's volume. A trailing / on --path means "into this folder"; it is created if needed.

stackblaze files upload customers.csv --path /data/uploads/imports/ -p github-demo-cw8z -e dev -a hello-web
OK Uploaded → /data/uploads/imports/customers.csv
pod=hello-web-qw6y-web-59ffbdcb4-xckfx

files delete

Usage: stackblaze files delete [options] [path]

Delete a file or directory on a volume mount

Options:
  --api-url <url>        StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>        API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>   Project name
  -e, --env <name>       Environment name (default: production)
  -a, --app <name>       App name
  --json                 Output JSON (same as -o json) (default: false)
  --path <path>          Absolute path to delete (or pass it positionally)
  --pod <name>           Target pod
  --container <name>     Target container
  -y, --yes              Skip confirmation prompt (default: false)
  -o, --output <format>  Output format: text or json (choices: "text", "json")
  -h, --help             Print help

May be disabled by your platform admin.

Example

Delete a file on the app's volume. Type yes to confirm, or pass -y.

stackblaze files delete /data/uploads/imports/customers-2026-11.csv -p github-demo-cw8z -e dev -a hello-web
stackblaze files list /data/uploads/imports -p github-demo-cw8z -e dev -a hello-web
!  Delete /data/uploads/imports/customers-2026-11.csv on github-demo-cw8z/dev/hello-web-qw6y?
Type "yes" to continue: yes
OK Deleted /data/uploads/imports/customers-2026-11.csv
/data/uploads/imports  pod=hello-web-qw6y-web-59c674b9c6-f8jsk
(empty)

files rename

Usage: stackblaze files rename [options]

Rename or move a file on a volume mount

Options:
  --api-url <url>        StackBlaze API base URL (env STACKBLAZE_API_URL)
  --token <token>        API token, sb_pat_... (env STACKBLAZE_TOKEN)
  -p, --project <name>   Project name
  -e, --env <name>       Environment name (default: production)
  -a, --app <name>       App name
  --json                 Output JSON (same as -o json) (default: false)
  --from <path>          Source absolute path
  --to <path>            Destination absolute path
  --pod <name>           Target pod
  --container <name>     Target container
  -o, --output <format>  Output format: text or json (choices: "text", "json")
  -h, --help             Print help

May be disabled by your platform admin.

Example

Rename a file on the app's volume, then list the folder.

stackblaze files rename --from /data/uploads/imports/customers.csv --to /data/uploads/imports/customers-2026-11.csv -p github-demo-cw8z -e dev -a hello-web
stackblaze files list /data/uploads/imports -p github-demo-cw8z -e dev -a hello-web
OK Renamed /data/uploads/imports/customers.csv → /data/uploads/imports/customers-2026-11.csv
/data/uploads/imports  pod=hello-web-qw6y-web-59ffbdcb4-xckfx
f  customers-2026-11.csv 22B

On this page