Skip to main content
PRE-RELEASE: Drive commands are not GA yet. Their arguments, flags, and output may change.
Drives are shared storage that outlives sandboxes, and many sandboxes can mount the same drive at once. Create one, then mount it in a running sandbox with baseten sandbox drive mount. Only sandboxes in the drive’s region can mount it.

list

Lists the team’s drives, newest first, up to --limit. Filter by --query or repeatable --status. Labels aren’t listed. Read them with drive describe.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
INTEGER
default:"1000"
Most drives to list. 0 lists all.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Search over drive names.
TEXT (repeatable)
Only drives with one of these statuses. Repeatable.One of: deleting, deployed, deploying, failed
TEXT
Team name or ID to list drives of. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging

Examples

List drives
List only failed drives

Filter output with --jq

Print the name of every drive

Output

Text mode (--output text): Table with columns: NAME, STATUS, REGION, CREATED. Prints “No drives found.” to stderr when the list is empty, and a note to stderr when --limit left some out. JSON mode (--output json): Go output type cmd.DriveList.

describe

Retrieves one drive’s record: status, region, and labels.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
TEXT
required
Name of the drive.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the drive belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging

Examples

Describe a drive

Filter output with --jq

Print the drive’s region

Output

Text mode (--output text): One field per line describing the drive. Empty fields are left out. JSON mode (--output json): Go output type managementapi.Drive.

create

Creates a drive and prints its record.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
TEXT (repeatable)
Label as KEY=VALUE. Repeatable.
TEXT
Unique name of the drive. The server generates one when omitted.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Region of the drive. Only sandboxes in the same region can mount it. Defaults to the default sandbox region.
TEXT
Team name or ID to create the drive in. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging

Examples

Create a drive
Create one in a specific region with labels

Filter output with --jq

Create a drive and print its status

Output

Text mode (--output text): One field per line describing the created drive. Empty fields are left out. JSON mode (--output json): Go output type managementapi.Drive.

update

Replaces a drive’s labels. Any --label replaces all of them, and --clear-labels removes them all. A drive’s name and region can’t change.

Options

BOOL
Remove all of the drive’s labels. Cannot be combined with --label.
TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
TEXT (repeatable)
Label as KEY=VALUE, replacing all of the drive’s labels. Repeatable. Cannot be combined with --clear-labels.
TEXT
required
Name of the drive.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the drive belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Enable verbose logging

Examples

Replace a drive’s labels

Filter output with --jq

Replace a drive’s labels and print them

Output

Text mode (--output text): One field per line describing the updated drive. Empty fields are left out. JSON mode (--output json): Go output type managementapi.Drive.

delete

Deletes a drive and all its data. You can’t undo it. Deletion continues after this command returns.

Options

TEXT
Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
TEXT
required
Name of the drive.
TEXT
default:"text"
Output formatOne of: text, json, jsonl, none
TEXT
Use a specific stored profile for this command, overriding BASETEN_PROFILE and the current profile
TEXT
Team name or ID the drive belongs to. Defaults to your only team; required if you belong to more than one. Run ‘baseten org team list’ to see teams.
BOOL
Skip the interactive confirmation prompt. Required when stdin is not a terminal.
BOOL
Enable verbose logging

Examples

Delete a drive without the confirmation prompt

Filter output with --jq

Delete a drive and print its status

Output

Text mode (--output text): A confirmation line on stderr. JSON mode (--output json): Go output type managementapi.Drive. The drive’s record as deletion starts.