You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
13
+
Bytebase provides **Prior Backup**functionality that captures a snapshot of data before changes are applied. This safety mechanism stores the original state of affected rows, enabling you to revert data changes with **1-Click** when necessary. You can perform **multi-task rollbacks** to efficiently revert multiple related changes across databases in one operation.
14
14
15
15
<Info>
16
16
17
-
The backup data is stored in your own database instance. Bytebase does not purge the backup data automatically.
18
-
You can manually delete the data in `bbdataarchive` database/schema.
17
+
Backup data is stored within your own database instance in a dedicated `bbdataarchive` location. Bytebase does not automatically purge this backup data, so you can manually clean up the `bbdataarchive` database or schema as needed.
19
18
20
19
</Info>
21
20
@@ -30,73 +29,85 @@ You can manually delete the data in `bbdataarchive` database/schema.
30
29
31
30
## Supported Operations
32
31
33
-
We are working on enabling backup and 1-click rollback for more SQL statements.
32
+
Bytebase continues to expand backup and rollback support for additional SQL statement types.
34
33
35
34
### Feasibility Conditions
36
35
37
36
Prior backup is feasible when meeting **all** of the following conditions:
38
37
39
38
- The SQL statement size is less than 2M.
40
-
41
39
- No mixed `UPDATE`/`DELETE` on the same table.
42
-
43
40
- No mixed DDL/DML.
44
41
45
42
1-click rollback is feasible when meeting **all** of the following conditions:
46
43
47
44
- For `UPDATE`, the changed table has primary key and primary key columns are not updated.
48
45
49
-
## Create backup
46
+
## Enable Prior Backup
47
+
48
+
You can enable the **Prior Backup** option either before or after creating a database change issue.
1. Select which changes you want to rollback - you can choose individual changes or rollback all of them at once. This **multi-task rollback** capability allows you to efficiently revert multiple related changes in a single operation.
Before using Prior Backup functionality, you must create the `bbdataarchive` storage location in your database instance. Follow the instructions for your specific database engine:
99
+
89
100
### MySQL
90
101
91
-
1. Create the `bbdataarchive` Database:
102
+
1.**Create the backup database:**
92
103
93
104
```sql
94
105
CREATEDATABASEbbdataarchive;
95
106
```
96
107
97
-
1. Grant Necessary Privileges:
108
+
1.**Grant necessary privileges:**
98
109
99
-
Replace `your_user` with the actual username.
110
+
Replace `your_user` with the actual username that Bytebase uses to connect to your database.
100
111
101
112
```sql
102
113
GRANT ALL PRIVILEGES ON bbdataarchive.* TO 'your_user'@'%';
@@ -105,15 +116,15 @@ If the DML change contains more than 5 statements, then all statements will be b
105
116
106
117
### PostgreSQL
107
118
108
-
1. Create the `bbdataarchive` Schema:
119
+
1.**Create the backup schema:**
109
120
110
121
```sql
111
122
CREATESCHEMAbbdataarchive;
112
123
```
113
124
114
-
1. Grant Necessary Privileges:
125
+
1.**Grant necessary privileges:**
115
126
116
-
Replace `your_user` with the actual username.
127
+
Replace `your_user` with the actual username that Bytebase uses to connect to your database.
117
128
118
129
```sql
119
130
GRANT ALL PRIVILEGES ON SCHEMA bbdataarchive TO your_user;
@@ -122,29 +133,29 @@ If the DML change contains more than 5 statements, then all statements will be b
122
133
123
134
### Oracle
124
135
125
-
1. Create the `bbdataarchive` User:
136
+
1.**Create the backup user:**
126
137
127
138
```sql
128
139
CREATEUSERbbdataarchive IDENTIFIED BY password;
129
140
```
130
141
131
-
1. Grant Connection Privileges:
142
+
1.**Grant connection privileges:**
132
143
133
144
```sql
134
145
GRANT CREATE SESSION TO bbdataarchive;
135
146
```
136
147
137
-
1. Grant unlimited space quota to the `bbdataarchive` user on the specified `tablespace`:
148
+
1.**Grant unlimited space quota:**
138
149
139
-
Replace `tablespace_name` with the actual tablespace name.
150
+
Replace `tablespace_name` with your actual tablespace name.
140
151
141
152
```sql
142
153
GRANT QUOTA UNLIMITED ON tablespace_name TO bbdataarchive;
143
154
```
144
155
145
-
1. Grant Privileges to the Instance Administrator:
156
+
1.**Grant privileges to the instance administrator:**
146
157
147
-
Replace `admin_user` with the actual username of the instance administrator.
158
+
Replace `admin_user` with the actual username that Bytebase uses as the instance administrator.
148
159
149
160
```sql
150
161
GRANT CREATE ANY TABLE TO admin_user;
@@ -153,15 +164,15 @@ If the DML change contains more than 5 statements, then all statements will be b
153
164
154
165
### SQL Server
155
166
156
-
1. Create the `bbdataarchive` Database:
167
+
1.**Create the backup database:**
157
168
158
169
```sql
159
170
CREATEDATABASEbbdataarchive;
160
171
```
161
172
162
-
1. Grant Necessary Privileges:
173
+
1.**Grant necessary privileges:**
163
174
164
-
Replace `your_user` with the actual username.
175
+
Replace `your_user` with the actual username that Bytebase uses to connect to your database.
0 commit comments