Bare Metal Recovery on Linux
The actual restoration process in terms of Bare Metal Recovery for Linux has a lot of similarities to the way it is done in Windows, but the initial setup is several times longer – even though the logic behind it is also similar.
First of all, the Linux BMR system needs a direct contact with Bacula’s Director during the Bare Metal Recovery process in order to be able to restore all of the data properly. As such, a Console resource needs to be set up beforehand via configuring the Director – using a procedure such as the one shown below.
Name = rescue-fd # same name as on your Client resource
Password = bacularescue
CommandACL = *all*
ClientACL = *all*
CatalogACL = *all*
JobACL = *all*
StorageACL = *all*
ScheduleACL = *all*
PoolACL = *all*
FileSetACL = *all*
WhereACL = *all*
# The next two ACLs are required when using
# Bacula Enterprise Edition 8.8.0 and above
UserIdACL = *all*
DirectoryACL = *all*
# This last ACL is available when using
# Bacula Enterprise Edition 8.8.0 and above but is not required
RestoreClientACL = *all*
Another resource that the system needs in order to perform Bare Metal Recovery operations is Rescue Client – the example of its configuration is also shown below.
Name = rescue-fd # Use your rescue client nam
Address = 0.0.0.0 # Will be set automatically by LinuxBMR
Password = bacularescue # USE YOUR OWN PASSWORD
Catalog = MyCatalog
The last resource that would be necessary for proper restore operation is a Job resource with the same name that does not have any specific RunScript directives. All three of these jobs are required for any data to be backed up for further restoration in the first place
The next general step would also be relatively familiar – it is the process of downloading and customizing a recovery image in the form of an ISO file. It can be located in the Bacula Systems’ customer area and it has the following name:
This image can be either burned to a CD/DVD or written to a bootable USB device, depending on the client’s personal preference.
Booting using the recovery image is the first step in an actual Bare Metal Recovery process, and it may differ depending on whether you need to access BIOS to change the priority of boot devices or you can open that menu without going into BIOS, depending on the hardware manufacturer.
The first visual representation of the recovery process that a client would be able to see is the Isolinux language selection screen which should look similar to the example below. It can be navigated using standard arrow keys, and the “selection” key is Enter by default.
It is worth noting that this screen only lets you choose the language for your Linux Desktop environment, and the only language Bacula’s Bare Metal Recovery tool works in is English. After you have chosen the language from the list above, you would be transferred to the BMR boot screen, as shown below.
However, there is another task that needs to be done here, and that is choosing the correct keymapping layout. It can be done by pressing F3 on that same page and choosing the layout that the client prefers with “Enter”.
Once the keymap settings have been defined, the BMR boot screen is going to appear again, and choosing the “Start Bacula LinuxBMR” option would initiate the graphic desktop environment to proceed with the Bare Metal Recovery task. Once the graphical interface is fully loaded, it is recommended to verify if the network settings of the environment are correct, since it is possible that everything was reset after loading this new environment. To open the Network Settings window, the user would have to click on the Network icon within the Linux environment located to the left of the clock at the bottom of the screen and then choose “Connection Information”.
The “Bacula Rescue” icon is the starting point for the BMR process once the proper network configuration is ensured. From now on, quite a lot of the menus are going to be somewhat similar to examples from the Windows Bare Metal Recovery guide, starting with the “Welcome” screen, as shown below.
The rest of the BMR wizard screens are going to be shown in a numerical order for easier reading comprehension.
- The first page that a client sees after going past the “Welcome” screen is the initial setup page that includes client’s name-password combination, director’s name-address combination, and more. All of these parameters are loaded directly from the ISO file and could have been modified beforehand (using the Client resource that was created as the first step of this process) – and it is also possible to modify them at this exact screen.
- At this step, the system checks if the client daemon is running and if it is accessible from the Director – if even a single error pops up, then the process would not be able to continue. A client getting past this screen means that all of these parameters were configured correctly. The following screen shows a list of clients that the Director can detect, and the client would have to choose one to proceed.
- The next screen showcases different backups that were created under the chosen client – and the client would have to choose a BMR-enabled backup to proceed. The status of the backup is shown by a capital letter after the date of the backup (with F meaning a completed backup), and a linuxbmr field would show if the backup in question can be used for BMR or not. If the chosen client does not have any backups created, the error message would show up and the client would then be sent back to the “client” screen without being able to proceed.
- The more difficult part of the setup begins right here. Once a suitable BMR-ready backup is chosen, the tool loads the disk layout information from the source host to reproduce that layout on the target host, followed by restoring the data from the backup to the target host and configuring the bootloader as a final step of the process. Disk mapping is the first part of this process – it is a part of the process in which a user has to make sure that every disk of the source host is allocated to a disk of the target host. A relatively simple interface allows for different disk allocation rules, and there is also an option to straight-up remove one or several volumes from the process whatsoever, meaning that they are not going to be restored during the Bare Metal Recovery process.
- Once disk partitions have been set up, another Bacula screen allows for these partitions to be modified and adjusted per-partition basis. Adding more partitions or removing them is not possible at this stage, the only option is to adjust them. Green-colored partitions have extra space left, while red partitions are overfilled and would have to be shrunk in size for the BMR process to proceed.
- There are two partitioning methods available in Bacula Linux Bare Metal Recovery – Automatic and Manual. Automatic partitioning attempts to rearrange existing partitions without any input from the client, and that way it is possible to skip a single step of this instruction. For a more personalized approach, it is possible to choose Manual partitioning, which results in the following screen. An experienced user can use this screen to manually change specific partition rules or restrictions, allowing for more flexibility down the road.
- One last step to go through before initiating the restoration is to match the volumes from inside of the backup with the newly-partitioned volumes on the target host. Double-clicking on every “none” position on the “Restore to” category allows users to specify where this specific object would be restored to.
- The next part of the process is the entire restoration procedure, it can be monitored with a status screen as shown in the example below. This window shows the elapsed time, the estimated remaining time, as well as the general percentage status of the recovery process.
- The recovery process is technically completed now, but there are still a few more operations to go through. First of all, the picture below is the screen that is shown when the main recovery operation has been completed. It showcases a “success” message and a general log of errors and other issues that happened during the restoration phase, if any. The last step of the BMR process is to perform boot setup – it is done in a rather similar fashion to how partitioning could be done in the example above. It allows for two different approaches – automatic and manual. The automatic boot setup process allows the plugin to try and set up everything for the client, while the manual offers a high degree of customization to an experienced user to work with.
- If the automatic boot setup was chosen, the client then proceeds directly to the next, and final, screen of the Bacula wizard. If the manual boot setup was chosen instead, then the user would see the additional screen similar to how image #7 – with multiple boot scripts that can be customized and/or launched, with another segment of a window being delegated for boot script output results.
- Once the boot setup process has been completed, all users shall see the final screen of the Bacula Linux Bare Metal Recovery wizard, offering a list of errors and warnings that were detected during or after the recovery process. Clicking “Finish” is the final step of this manual.