From 7b1c23e27c528cf9f82cc99ed83ef6715c56ed22 Mon Sep 17 00:00:00 2001 From: Tahlia Richardson <3069029+tahliar@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:13:01 +1000 Subject: [PATCH] Improve ReaR backup config examples (#404) * Update rear version number * Improve flow of rear config section * Add Btrfs example to rear config section bsc#1204927 jsc#DOCTEAM-787 * Add multipath example and warning * Move and improve UEFI example * Add important symbol to multipath example * Typo fix * Review updates round 1 * Updates from tech review * Replace hard-coded version with search command * Fix bootloader path * Formatting * Tech review updates --- xml/ha_rear.xml | 194 +++++++++++++++++++++++++++--------------------- 1 file changed, 111 insertions(+), 83 deletions(-) diff --git a/xml/ha_rear.xml b/xml/ha_rear.xml index abbb42818..87dea0f51 100644 --- a/xml/ha_rear.xml +++ b/xml/ha_rear.xml @@ -178,14 +178,12 @@ &rear; Version Updates + - To be compatible with older service packs, &productname; &productnumber; - ships with different &rear; versions: 1.16 (included in RPM package - rear116), 1.17.2.a (rear1172a), - 1.18.a (rear118a), and 2.4 (rear23a). - The latest version contains some - later enhancements from the upstream GitHub project. + To see which versions of &rear; are available with &productname; &productnumber;, + run the following command: +&prompt.root;zypper search --type package --verbose rear Find Important Information in Changelogs @@ -410,36 +408,22 @@ Setting Up &rear; and Your Backup Solution - To set up &rear;, you need to edit at least the &rear; - configuration file /etc/rear/local.conf and, if - needed, the Bash scripts that are part of the &rear; framework. + To install the latest version of &rear;, run the following command: - +&prompt.root;zypper install rear - In particular, you need to define the following tasks that &rear; - should do: + If you need to install an earlier version of &rear;, you can specify the package version. + For example: + +&prompt.root;zypper install rear23a + + To configure &rear;, add your settings to the &rear; configuration file + /etc/rear/local.conf and, if needed, edit the Bash + scripts that are part of the &rear; framework. In particular, you need to + define the following tasks that &rear; should do: - - - When your system is booted with UEFI - - If your system boots with a UEFI boot loader, install the package - ebiso and add the following line to - /etc/rear/local.conf: - - - ISO_MKISOFS_BIN="/usr/bin/ebiso" - - If your system boots with &uefisecboot;, you must also add the following line: - -SECURE_BOOT_BOOTLOADER="/boot/efi/EFI/BOOT/shim.efi" - - For more information about &rear; configuration variables for UEFI, see the - /usr/share/rear/conf/default.conf file. - - How to back up files and how to create and store the disaster recovery system @@ -451,10 +435,10 @@ - What to re-create exactly (partitioning, file systems, mount points, etc.) + What to re-create (partitioning, file systems, mount points, etc.) - This can be defined in /etc/rear/local.conf (for - example, what to exclude). To re-create non-standard systems, you may + This can be defined in /etc/rear/local.conf. + To re-create non-standard systems, you may need to enhance the Bash scripts. @@ -472,29 +456,13 @@ - To configure &rear;, add your options to the - /etc/rear/local.conf configuration file. (The former - configuration file /etc/rear/sites.conf has been - removed from the package. However, if you have such a file from your last - setup, &rear; will still use it.) - - - - All &rear; configuration variables and their default values are set in + All &rear; configuration variables and their default values are explained in /usr/share/rear/conf/default.conf. - Some example files (*example.conf) for user configurations - (for example, what is set in /etc/rear/local.conf) - are available in the examples subdirectory. - Find more information in the &rear; man page. - You should start with a matching example configuration file as template - and adapt it as needed to create your particular configuration file. - Copy various options from several example configuration files and paste them - into your specific /etc/rear/local.conf file that - matches your particular system. - Do not use original example configuration files, because they provide an - overview of variables that can be used for specific setups. + Below are some examples of useful configuration options. You can also find example files + for different scenarios in the /usr/share/rear/conf/examples/ subdirectory. + Use these to help you create your /etc/rear/local.conf file. After you have changed the &rear; configuration file, run the @@ -505,36 +473,24 @@ Using an NFS Server to Store the File Backup - - &rear; can be used in different scenarios. The following example uses - an NFS server as storage for the file backup. - - - - - + + Set up an NFS server with &yast; as described in the &sls; &productnumber; &admin;: . - - + + Define the configuration for your NFS server in the /etc/exports file. Make sure the directory on the - NFS server (where you want the backup data to be available), has the - right mount options. For example: + NFS server has the right mount options. For example, you might + need no_root_squash as the + rear mkbackup command runs as &rootuser;. + For more information, see man exports. -/srv/nfs *([...],rw,no_root_squash,[...]) - - Replace /srv/nfs with the path to your - backup data on the NFS server and adjust the mount options. You will - probably need no_root_squash to access the backup - data as the rear mkbackup command runs as - &rootuser;. - - - + + Adjust the various BACKUP parameters in the configuration file /etc/rear/local.conf to make @@ -542,8 +498,35 @@ examples in your installed system under /usr/share/rear/conf/examples/SLE12-*-example.conf. - - + + + + + + Backing up Btrfs subvolumes with <command>tar</command> + + Btrfs is set up with subvolumes, but tar creates backups with the + option, which excludes subvolumes. Therefore, the + mount points for the subvolumes must be explicitly included in the &rear; configuration. + + + Add this configuration snippet to /etc/rear/local.conf and + adjust it according to your setup. For more information and additional options, see the + example files at /usr/share/rear/conf/examples/SLE*-btrfs-example.conf. + +OUTPUT=ISO +BACKUP=NETFS +BACKUP_URL=nfs://host.&exampledomain;/path/to/rear/backup +BACKUP_PROG_INCLUDE=( /root /boot/grub2/i386-pc /tmp /opt /var /boot/grub2/x86_64-efi /srv /usr/local ) + + Mount points for <literal>BACKUP_PROG_INCLUDE</literal> + + You can find the mount points for the subvolumes on your specific system by running + the following command: + +&prompt.root;findmnt -n -r -o TARGET -t btrfs | grep -v '^/$' | egrep -v 'snapshots|crash' + + Using Third-Party Backup Tools Like EMC NetWorker @@ -557,11 +540,56 @@ adjust it according to your setup: BACKUP=NSR - OUTPUT=ISO - BACKUP_URL=nfs://host.&exampledomain;/path/to/rear/backup - OUTPUT_URL=nfs://host.&exampledomain;/path/to/rear/backup - NSRSERVER=backupserver.&exampledomain; - RETENTION_TIME="Month" +OUTPUT=ISO +BACKUP_URL=nfs://host.&exampledomain;/path/to/rear/backup +OUTPUT_URL=nfs://host.&exampledomain;/path/to/rear/backup +NSRSERVER=backupserver.&exampledomain; +RETENTION_TIME="Month" + + For more information about supported third-party backup tools, see + man rear, section BACKUP SOFTWARE INTEGRATION. + + + + + Backing up multipath devices + + By default, &rear; ignores file systems on multipath devices because it assumes they are + on remote storage, not part of the local system. You can make &rear; include these + file systems by adding the following line to /etc/rear/local.conf: + + AUTOEXCLUDE_MULTIPATH=n + + + + Booting your system with UEFI + + If your system boots with a UEFI boot loader, additional configuration is required: + + + + + Install the package ebiso: + +&prompt.root;zypper install ebiso + + + + Add the following line to /etc/rear/local.conf: + +ISO_MKISOFS_BIN="/usr/bin/ebiso" + + + + If your system boots with &uefisecboot;, you must also add the following line: + +SECURE_BOOT_BOOTLOADER="/boot/efi/EFI/sles/shim.efi" + + + + For more information about &rear; configuration variables for UEFI, see the + /usr/share/rear/conf/default.conf file. +