#2032 Issue closed: How to restore the system on a specific date with incremental backup

Labels: support / question, won't fix / can't fix / obsolete

blagodarno opened issue at 2019-02-05 13:25:

I'm testing with rear 2.4 on CentOS 7

I'm using the following config:

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=cifs://10.79.101.135/Backups 
BACKUP_OPTIONS="cred=/etc/rear/cifs"
BACKUP_TYPE=incremental
FULLBACKUPDAY="Sun"

On the network share i have:

05.02.2019  03:34      234780672 rear-test.iso
05.02.2019  03:34            278 VERSION
05.02.2019  03:34            202 README
05.02.2019  03:34          77413 rear-test.log
01.02.2019  10:26     1276220257 backup.tar.gz
05.02.2019  03:34        3601835 backup.log
05.02.2019  03:34              0 selinux.autorelabel
02.02.2019  03:25     1275333564 2019-02-02-0322-F.tar.gz
03.02.2019  03:14     1276683721 2019-02-03-0311-F.tar.gz
04.02.2019  03:22       34024716 2019-02-04-0321-I.tar.gz
05.02.2019  03:34       43008403 2019-02-05-0333-I.tar.gz

When i try: rear -v recover
Rear always use archive backup.tar.gz.
?
For example use 2019-02-03-0311-F.tar.gz ?
How use incremental backup file ( 2019-02-05-0333-I.tar.gz ) for recover system ?
Sorry for my bad english.

jsmeix commented at 2019-02-05 15:00:

@blagodarno

perhaps incremental and/or differential backup
does not work for BACKUP_URL=cifs...
(I never tried that - I use only BACKUP_URL=nfs...)

See "man rear" e.g. online at
https://github.com/rear/rear/blob/master/doc/rear.8.adoc
and/or usr/share/rear/conf/default.conf e.g. online at
https://raw.githubusercontent.com/rear/rear/master/usr/share/rear/conf/default.conf
that read (excerpt)

Incremental or differential backup is currently
only known to work with BACKUP_URL=nfs

but you use BACKUP_URL=cifs...

I think one of the scripts that need to be adapted and enhanced
to support incremental and/or differential backup also for other
BACKUP_URL schemes is
usr/share/rear/verify/NETFS/default/070_set_backup_archive.sh
that is a symlink to
usr/share/rear/prep/NETFS/default/070_set_backup_archive.sh

See the sections "Debugging issues with Relax-and-Recover"
and "How to adapt and enhance Relax-and-Recover" at
https://en.opensuse.org/SDB:Disaster_Recovery
for generic info what you could do to adapt and enhance ReaR
to support incremental and/or differential backup also for other
BACKUP_URL schemes.

I.e. run ReaR in debugscript mode with -D and inspect what happens
while the 070_set_backup_archive.sh script runs.

blagodarno commented at 2019-02-06 06:46:

You do not understand me.
Incremental backup for BACKUP_URL=cifs... works well and is expected.
The question is in the recovery process.

  1. How to recover on a certain date having a incremental backup ?
  2. What options should i use to recover not from default backup.tar.gz but other full backup archive ( for example 2019-02-03-0311-F.tar.gz ) ?

dcz01 commented at 2019-03-27 13:52:

@blagodarno
Hello, there isn't an option to restore to or from an specific date for the normal internal backup routine of ReaR.
The same question i mentioned a long time ago too.

jsmeix commented at 2019-04-26 09:30:

I think this issue is sufficiently answered by
https://github.com/rear/rear/issues/2032#issuecomment-477164692
and we do not intend to enhance ReaR's internal backup methods
in this way because ReaR's internal backup methods are not meant
as a real backup solution, cf.
https://github.com/rear/rear/blob/master/doc/rear.8.adoc
that reads (excerpt)

For demonstration and special use purposes Relax-and-Recover
also includes an internal backup method, NETFS, which
can be used to create a simple tar.gz archive of the system.
For all permanent setups we recommend using something
more professional for backup ...

and the section about
"Relax-and-Recover versus backup and restore" in
https://en.opensuse.org/SDB:Disaster_Recovery


[Export of Github issue for rear/rear.]