Skip to main content

How to create a Database Lab branch

GUI​

  1. Go to the Database Lab instance page.
  2. Chose the Branches tab. Database Lab instance page / Create branch
  3. Click the Create branch button. Database Lab instance page / Create branch
  4. Fill the Branch name field with a meaningful name.
  5. (optional) Change the Parent branch and Snapshot ID if needed.
  6. Click the Create branch button.
    Database Lab instance page / Create branch
  7. You will be redirected to the Database Lab branch page. Database Lab instance page / Create branch

CLI​

Before you run any commands, install Database Lab CLI and initialize configuration. For more information, see Install and initialize Database Lab CLI.

Reference​

Basic branch creation​

Create a branch using dblab branch command, specify branch name. After creation, you will switch into the new branch automatically.

$ dblab branch test

Create a branch with a different parent​

By default, created branch will be a child of the current branch. You can specify a different parent branch using --parent-branch.

$ dblab branch --parent-branch dev test

Create a branch from a specific snapshot ID​

  1. List all available snapshots
$ dblab snapshot list
[
{
"id": "SNAPSHOT_ID_1",
"createdAt": "2025-04-07T20:16:57Z",
"dataStateAt": "2025-04-07T20:16:57Z",
"branch": "test",
...
},
{
"id": "SNAPSHOT_ID_2",
"createdAt": "2025-04-07T20:14:43Z",
"dataStateAt": "2025-04-07T20:14:43Z",
"branch": "test2",
...
},
...
  1. Create a branch, specifying the desired snapshot
$ dblab branch --snapshot-id SNAPSHOT_ID_1 test