$ sudo bconsole *restore client=srv11.example.com-fd Using Catalog "MyCatalog" First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified Job date 13: Cancel Select item: (1-13):
Поскольку нужно восстановить последний бэкап, выбираю "5: Select the most recent backup for a client"
Select item: (1-13): 5 Automatically selected FileSet: Standard Set +-------+-------+-----------+-----------------+---------------------+--------------+ | JobId | Level | JobFiles | JobBytes | StartTime | VolumeName | +-------+-------+-----------+-----------------+---------------------+--------------+ | 1,119 | F | 5,022,824 | 168,370,798,105 | 2014-10-12 23:37:33 | Archive-0078 | | 1,119 | F | 5,022,824 | 168,370,798,105 | 2014-10-12 23:37:33 | Archive-0079 | | 1,119 | F | 5,022,824 | 168,370,798,105 | 2014-10-12 23:37:33 | Archive-0081 | | 1,119 | F | 5,022,824 | 168,370,798,105 | 2014-10-12 23:37:33 | Archive-0082 | | 1,277 | D | 430,784 | 18,791,703,231 | 2014-10-27 06:26:52 | Archive-0080 | | 1,294 | I | 90,159 | 3,764,072,742 | 2014-10-28 00:28:47 | Archive-0013 | | 1,294 | I | 90,159 | 3,764,072,742 | 2014-10-28 00:28:47 | Archive-0080 | | 1,310 | I | 75,993 | 4,224,432,445 | 2014-10-28 23:08:27 | Archive-0013 | +-------+-------+-----------+-----------------+---------------------+--------------+ You have selected the following JobIds: 1119,1277,1294,1310 Building directory tree for JobId(s) 1119,1277,1294,1310 ... ++++++++++++++++++++++++++++++++++++++++++ 4,260,904 files inserted into the tree. You are now entering file selection mode where you add (mark) and remove (unmark) files to be restored. No files are initially added, unless you used the "all" keyword on the command line. Enter "done" to leave this mode. cwd is: / $
Около минуты занимает построение списка. После появление приглашения можно добавить нужные файлы в задание восстановления.
$ cd /var/www/vhosts/ cwd is: /var/www/vhosts/ $ add shop.example.com 23,405 files marked. $ exit
После команды "exit" bacula выдаст информацию по созданному заданию восстановления и запросит подтверждение.
Bootstrap records written to /var/lib/bacula/bacula-dir.restore.4.bsr The job will require the following Volume(s) Storage(s) SD Device(s) =========================================================================== Archive-0082 File FileStorage Archive-0013 File FileStorage Volumes marked with "*" are online. 23,408 files selected to be restored. Run Restore job JobName: RestoreFiles Bootstrap: /var/lib/bacula/bacula-dir.restore.4.bsr Where: /bacula/restore Replace: always FileSet: Standard Set Backup Client: srv11.example.com-fd Restore Client: srv11.example.com-fd Storage: File When: 2014-10-29 11:56:46 Catalog: MyCatalog Priority: 10 Plugin Options: *None* OK to run? (yes/mod/no):
Если все верно, то выбираем "yes" и ждем пока данные восстановятся.
и куда он его восстановит?
ОтветитьУдалитьКуда укажете - туда и восстановит.
УдалитьWhere: /bacula/restore
Restore Client: srv11.example.com-fd
Настраивается на этапе "OK to run? (yes/mod/no):"