> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# stackshift database branch create

> Create a branch of a database

> [!NOTE]
>
> This page is generated from the StackShift CLI command definitions.

Create a branch of a database

### Synopsis

Create a branch of a database. It starts from the database as it is now unless you pass --from, --restore-point or --backup.

Exit codes: 8 your plan's limit is reached, 9 no room right now (nothing was charged), 10 the point in time is outside the history window, 11 the price needs confirming (resend with the --confirm-charge amount shown).

```
stackshift database branch create DATABASE [flags]
```

### Examples

```
  stackshift db branch create shop-db --name fix-checkout --ttl 24h --wait
  stackshift db branch create shop-db --name before-lunch --from "2026-10-24 14:00"
```

### Options

```
      --backup string            start from this backup ID
      --confirm-charge int       accept the quoted price, in minor units, shown when a branch costs money
      --from string              "now" (default) or a time like "2026-10-24 14:00" (local time unless it includes a zone)
  -h, --help                     help for create
      --idempotency-key string   retain and reuse this key with the exact request after a lost response
      --name string              branch name
      --poll-interval duration   progress polling interval (default 2s)
      --restore-point string     start from this restore point ID
      --sleep-after duration     put the branch to sleep after this much idle time, like 15m
      --source-ref string        what this branch is for, like pr:142
      --ttl string               delete the branch after this long: "24h", "7d" or "never"
      --wait                     wait until the operation finishes
```

### Options inherited from parent commands

```
      --api-url string       StackShift API URL
      --app string           application name or ID
      --color string         color output: auto, always, or never (default "auto")
      --debug                show request diagnostics
      --environment string   project environment
  -o, --output string        output format: table, json, yaml, or name (default "table")
      --profile string       configuration profile
      --project string       project name or ID
  -q, --quiet                suppress progress output
      --timeout duration     request timeout (default 30s)
      --token-file string    mode-0600 token file
      --token-stdin          read a CI token from stdin
  -y, --yes                  confirm risky operations
```

### SEE ALSO

* [stackshift database branch](https://docs.stackshift.cloud/cli-reference/stackshift_database_branch.md)	 - Branches: separate copies of a database for testing, previews and agents


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.