Restore using Advanced Relocation
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
In some cases, a database can use different disks to store the data.
c:\data\db1.MDF
e:\logs\db1_log.LDF
Available since Bacula Enterprise 8.6.17
Using the Bacula RegexWhere function, it is possible to
manipulate each file and generate new filenames. The destination
directories must exist prior to the restore.
In the following example, the database will be renamed and the path will be adapted to the new server.
db1 -> db1-old !db1!db1-old!i
c:\data\db1.MDF -> f:\data\db1-old.MDF !c:!f:!i
e:\logs\db1_log.LDF -> g:\data\db1-old_log.MDF !e:!g:!i
The resulting RegexWhere will be something like:
*restore regexwhere="!db1!db1-old!i,!c:!f:!i,!e:!g:!i"
...
database: db1-old
Note that the database name must be specified in the Plugin Options menu, else, files will be stored on disk and the SQL restore commands will have to be executed manually.
To convert a path, the windows path separator must be escaped correctly in the console:
*restore regexwhere="!c:\\\\data\\\\db1!c:\\data2\\db1!i"
or
*restore regexwhere="!c:.data.db1!c:/data2/db1!i"
or
*restore regexwhere="!c:\\\\data\\\\db1!c:/data2/db1!i"
See also
Next articles:
Go back to: Restore Scenarios.