When modifying data in production databases, having a backup is crucial for quick recovery from mistakes. Bytebase’s 1-Click Data Rollback feature automatically creates backups before data changes and allows instant rollback when needed. This tutorial demonstrates how to use this feature and configure automatic backups.Documentation Index
Fetch the complete documentation index at: https://docs.bytebase.com/llms.txt
Use this file to discover all available pages before exploring further.

Step 1 - Start Bytebase with sample data
-
Ensure Docker is running, then start the Bytebase container:

-
Open Bytebase in localhost:8080, fill in the fields and click Create admin account. You’ll be redirected to Workspace.

-
During workspace setup, choose the built-in sample data.

Step 2 - Verify backup schema
Bytebase stores backup data in a dedicatedbbdataarchive schema (for PostgreSQL) that’s automatically created with our sample databases.
-
Navigate to
Sample Project> Database > Databases. -
Select
hr_testto see thebbdataarchiveschema already in place.
Step 3 - Execute data change with backup
-
Open SQL Editor, select
hr_test, and double-click theemployeetable to view current data. Note that employee 10001’s first name isGeorgi.
-
Navigate to
Sample Project> CI/CD > Plans. Click +New Plan, select Data Change, choose thehr_testdatabase, then click Confirm. -
Enable Prior Backup at the bottom of the form. Enter the following SQL:
Click Create, then Ready for review.
-
Go to the Rollout tab and click Run to execute the change.

- After execution, check the Overview tab to see the backup confirmation message.
-
To verify the change, return to SQL Editor and run:

-
To view the backup, switch to the
bbdataarchiveschema and double-click the backup table to see the original data preserved.
Step 4 - Perform 1-Click rollback
-
In the Rollout tab, click the Rollback button next to the completed change.

- Review the generated rollback SQL, click Confirm, then Ready for Review, and finally Rollout to execute.
- Return to SQL Editor to verify the data has been restored to its original state.
Step 5 - Configure automatic backups
-
Navigate to project Settings to find these backup options under Issue related:
- Auto enable backup: Automatically backs up data for all data changes
- Skip backup errors: Continues with changes even if backup fails
Database-specific considerations
For MySQL, SQL Server, and Oracle, Bytebase uses a separatebbdataarchive database rather than a schema to store backups. See the documentation below for details.

