Backup methods (II): ReaR
Making backups regularly is one of the most relevant tasks for a Linux user. In this new part of the series ‘Backup methods’, I will show you how to use Relax-and-Recover (ReaR).
Relax-and-Recover (ReaR) is a “Linux bare metal disaster recovery solution”. It allows you to create a rescue system which can restore the partition layout and the bootloader. You can use another program for backing up user and system files or you can configure ReaR to do it.
/etc/rear/local.confand edit the following lines:
# Output format for the rescue system (ISO or USB) OUTPUT=ISO # Output location for the rescue system OUTPUT_URL=file:///mnt/rescue_system/
- To create the rescue system, run (as root or using sudo):
- Then, you can transfer the rescue system to an external medium and boot it on the new hardware (make sure you only have the target disk installed on the system, it will make the process easier).
- Select the “Recover” option. Once the startup configuration is done, it will show a user prompt: type
rootand press Enter.
- To replicate the partition table on the target disk, type
- When this process is finished, you will be able to copy system files to the mount point specified in the command line (
/mnt/local). You can use several methods like SSH (using
scp) or by attaching a USB or hard drive.
- When you finished, type
exitand ReaR will install the bootloader.
Back up system files with ReaR
- ReaR has a built-in backup method you can configure by editing
/etc/rear/local.confand adding these lines:
BACKUP=NETFS # Output location for the backup BACKUP_URL=file:///srv/recoverbackup/
- In order to make a backup of your system files, you need to mount an external drive or USB and specify this mount point in the config file.
- Then, you can run
rear mkbackuponlyto only create the backup, or
rear mkbackupto create the rescue system and the backup.
- When using the rescue system, before running
rear recover, copy backup file (
backup.tar.gz) to the directory specified in
In Debian/Ubuntu systems, you can use
dpkg-reconfigureto reconfigure an installed package using intuitive dialogs. I will show you how to use this command to change some system settings.
If you have a scanned PDF and you want to be able to search and copy text from it, in this tutorial I will show you how to do it.
If you want to do X11 forwarding from your container to your host, you can type these simple commands.
If you don’t have a Graphical User Interface (GUI) on your Linux device, or you need a simple text-based web browser, I will show you a couple of great programs.
A comprehensive list of Linux-related websites sorted by categories.