Data Rollback
Bytebase allows taking Prior Backup before a data change is made. Bytebase stores the pre-snapshot of the affected rows, which allows you to revert that data change if needed.
Prior backup is only feasible when meeting any of the following conditions:
- No more than 5 statements and every statement is either
UPDATE
orDELETE
. - All statements are
UPDATE
for the same table withPRIMARY KEY
orUNIQUE KEY
inWHERE
clause.
Database | Prerequisites | 1-click Rollback |
---|---|---|
MySQL | Create a bbdataarchive database on the instance where your database is located. | β |
PostgreSQL | Create a bbdataarchive schema on the database. | β |
Oracle | Create a bbdataarchive database on the instance where your database is located. | β |
SQL Server | Create a bbdataarchive database on the instance where your database is located. | β |
Create backup
You can toggle Prior Backup switch before or after creating the issue.
1-click rollback
-
Once the change has been rolled out. You can click the Rollback button to create the rollback issue.
-
The rollback issue automatically populates the rollback statements.
Inspect the backup data
You can go to SQL Editor to inspect the backup data. If the DML change contains no more than 5 statements, then each statements will be backed up to a separate table.
If the DML change contains more than 5 statements, then all statements will be backed up to a single table.
Project backup settings
- You can enable Prior Backup by default.
- You can control whether you want to skip backup errors and continue changing the data.