[MDEV-18329] Backup/Restore Single Database as Different Name Created: 2019-01-21 Updated: 2024-01-11 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | mariabackup |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Critical |
| Reporter: | Nuno | Assignee: | Ralf Gebhardt |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | innodb | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
I believe at the moment it is not be possible to restore a single database from a Backup, without clearing all other databases in the server (because we need to empty the target directory first). For example, it would be GREATLY convenient to backup "MyDatabase", and restore it as "MyDatabase_restore" (without affecting any existing database). This can be very helpful if something went wrong with a DDL change, and I need to recreate it and copy data from the previous backup to the main database. |
| Comments |
| Comment by Nuno [ 2019-02-15 ] |
|
From my understanding, this could be "easily" automated. The Backup and Prepare steps are already developed, as per: As for the Restore step, if we are restoring a full database, we probably need to:
If it's THIS simple, this could very well be automated. MariaBackup could generate "CREATE TABLE" scripts for every table at the time the Backup is made, and save in some folder inside the backup. |
| Comment by Geoff Montee (Inactive) [ 2019-09-25 ] |
|
This could probably be considered a duplicate of |