Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align backup on USB with backup on NFS #1165

Merged

Conversation

jsmeix
Copy link
Member

@jsmeix jsmeix commented Jan 13, 2017

The new config variable USB_SUFFIX
specifies the last part of the backup directory on the USB medium.
When USB_SUFFIX is unset or empty, backup on USB works
in its current default mode (i.e. backward compatible)
which means multiple timestamp backup directories
plus automated rescue environments and backups cleanup
via USB_RETAIN_BACKUP_NR.
When USB_SUFFIX is set, backup on USB works
in compliance with how backup on NFS works
which means a fixed backup directory and
no automated removal of any stuff
(regardless of USB_RETAIN_BACKUP_NR).
When backup on USB behaves as backup on NFS
(i.e. when USB_SUFFIX is set) multiple backups and
incremental/differential backups also work on USB.
See
#1164
#1160
#1145

@jsmeix jsmeix added cleanup documentation enhancement Adaptions and new features labels Jan 13, 2017
@jsmeix jsmeix added this to the Rear v2.1 milestone Jan 13, 2017
@jsmeix jsmeix self-assigned this Jan 13, 2017
@jsmeix
Copy link
Member Author

jsmeix commented Jan 13, 2017

For me incremental backups "just work" now with

OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
USB_SUFFIX="myincrementalbackups"
BACKUP=NETFS
BACKUP_URL=usb:///dev/disk/by-label/REAR-000
BACKUP_TYPE=incremental
FULLBACKUP_OUTDATED_DAYS=7
FULLBACKUPDAY=Wed

@jsmeix
Copy link
Member Author

jsmeix commented Jan 13, 2017

The default behaviour still works for me with

OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
BACKUP=NETFS
BACKUP_URL=usb:///dev/disk/by-label/REAR-000

After 5 times "rear mkbackup" I get on the REAR-000 medium
(with the default USB_RETAIN_BACKUP_NR=2)
the latest (current) rescue environment or backup plus
the second eldest and the third eldest (three all together):

rear/e205/20170113.1422
rear/e205/20170113.1422/kernel
rear/e205/20170113.1422/rear-e205.log
rear/e205/20170113.1422/syslinux.cfg
rear/e205/20170113.1422/backup.log
rear/e205/20170113.1422/initrd.cgz
rear/e205/20170113.1422/backup.tar.gz
rear/e205/20170113.1429
rear/e205/20170113.1429/kernel
rear/e205/20170113.1429/rear-e205.log
rear/e205/20170113.1429/syslinux.cfg
rear/e205/20170113.1429/backup.log
rear/e205/20170113.1429/initrd.cgz
rear/e205/20170113.1429/backup.tar.gz
rear/e205/20170113.1442
rear/e205/20170113.1442/kernel
rear/e205/20170113.1442/rear-e205.log
rear/e205/20170113.1442/syslinux.cfg
rear/e205/20170113.1442/backup.log
rear/e205/20170113.1442/initrd.cgz
rear/e205/20170113.1442/backup.tar.gz

As everything looks o.k. for me I will merge it.

@gozora
Copy link
Member

gozora commented Jan 13, 2017

@jsmeix
Yesterday I've spent several hours to make this somehow work with BLOCKCLONE!
Next time I'll write documentation instead :-).

@jsmeix
Copy link
Member Author

jsmeix commented Jan 13, 2017

@gozora
I appreciate your patient testing very much.
I hope with current GitHub master code
things work more as usual elsewhere also with USB
provided USB_SUFFIX is specified which BTW also
avoids things like #1166

I get more and more the uncomfortable feeling that
I may need to rework the whole backup on USB stuff
just as it happened to me with incremental backups :-(

@gozora
Copy link
Member

gozora commented Jan 15, 2017

@jsmeix

I just finished some testing of BLOCKCONE on USB. I can confirm that USB_SUFFIX works well!

V.

@jsmeix
Copy link
Member Author

jsmeix commented Jan 16, 2017

@gozora
many thanks for your positive feedback.
It is much appreciated!
Last week I was a bit frustrated because
I had seen some bits of too ugly code cf. "FIXME" in
a603b46
(cf. http://tldp.org/LDP/abs/html/gotchas.html)
that obscured my mind so that I got confused
also about the "backuparchive" usage cf.
#1166 (comment)
but the "backuparchive" usage and implementation is actually o.k.
only that the variable name should be uppercase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants