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
These steps restore the backup made with Mariabackup.
224
+
225
+
At some point before doing the restore, the backup needs to be prepared. Here `/my/own/backupdir` contains a previous backup. Perform the prepare like this:
226
+
227
+
```console
228
+
$ docker run --rm -v /my/own/backupdir:/backup %%IMAGE%%:latest gosu mysql mariabackup --prepare --target-dir=/backup
229
+
```
230
+
231
+
Now that the image is prepared, start the container with both the data and the backup volumes and restore the backup:
232
+
233
+
```console
234
+
$ docker run --rm -v /my/own/newdatadir:/var/lib/mysql -v /my/own/backupdir:/backup %%IMAGE%%:latest gosu mysql mariabackup --copy-back --target-dir=/backup
235
+
```
236
+
237
+
With `/my/own/newdatadir` containing the restored backup, start normally as this is an initialized data directory:
238
+
239
+
```console
240
+
$ docker run --name some-%%REPO%% -v /my/own/newdatadir:/var/lib/mysql -d %%IMAGE%%:latest
241
+
```
242
+
243
+
For further information on Mariabackup, see the [Mariabackup Knowledge Base](https://mariadb.com/kb/en/mariabackup-overview/).
0 commit comments