#2404 Issue closed: How recover process work and how to select from which incremental backup to recover?

Labels: support / question, fixed / solved / done

bobbysch opened issue at 2020-05-21 20:16:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    any

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):
    any

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
    any

  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    any

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    any

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    any

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    any

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):
    any

  • Description of the issue (ideally so that others can reproduce it):
    I'd like to understand the recover process exactly when there are incremental backups associated.
    If I have a full backup (-F) and several incremental backups files (-I) and if I recover, what backup file(s) are used by default and how can I decide what specific incremental backup file to get point in time recovery?

  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

To paste verbatim text like command output or file content,
include it between a leading and a closing line of three backticks like

```
verbatim content
```

gozora commented at 2020-05-21 20:32:

@bobbysch I actually never used this feature in ReaR, but there is quite a long comment about this topic in default.conf. Check it out, maybe it will be helpful.

Kind of another approach to incremental backups (and also de-duplication) can be (starting with ReaR 2.0) BorgBackup integration. Some details on how to configure ReaR with BorgBackup can be find here.

V.

bobbysch commented at 2020-05-22 19:35:

@gozora: Thank you for pointing me to that exact place in the documentation.
According to the documentation:

"rear recover" will restore first the latest full backup
that exists plus all incremental backups in the
ordering as they were made after the latest full backup

So I guess if I only want to restore part of the incremental backups, I have to move away others to a different place before launching the recover process.

jsmeix commented at 2020-05-25 06:50:

@bobbysch
to understand really exactly how things work in ReaR
the only way that really works is to read the ReaR scripts.

Regarding incremental and/or differential tar backup see the script
usr/share/rear/prep/NETFS/default/070_set_backup_archive.sh
https://raw.githubusercontent.com/rear/rear/master/usr/share/rear/prep/NETFS/default/070_set_backup_archive.sh

This script is run during "rear mkbackup" and
the same is also run during "rear recover" via its symbolic link
usr/share/rear/verify/NETFS/default/070_set_backup_archive.sh

In general restoring only parts of a series of incremental tar backups
would result an incosistent global state of all what is restored.
But in special cases when you know exactly what you do
the result is exactly what you requested.


[Export of Github issue for rear/rear.]