#2679 Issue closed: Allow NETFS_KEEP_OLD_BACKUP_COPY=no

Labels: support / question, fixed / solved / done

dragon299 opened issue at 2021-09-23 12:08:

We search for an option to actively set NETFS_KEEP_OLD_BACKUP_COPY to no.

Reason: We have one volume which we need to backup using DD instead of tar. Therefore we have a two step rear backup where we do the following:

/sbin/rear mkbackup && /sbin/rear -C luks mkbackuponly

We would like to rename the latest backup to ".old" when we start to create a new backup. But our issue is that the backup will be renamed a second time when we run the backup of our luks volume.

It would be nice if we can set NETFS_KEEP_OLD_BACKUP_COPY = n in our luks.conf.

jsmeix commented at 2021-09-23 12:26:

NETFS_KEEP_OLD_BACKUP_COPY is a boolean variable
that behaves as described in default.conf

# Boolean variables can be set to anything
# as we only check whether the variable is not empty
# so that both VAR=yes and VAR=no evaluate to boolean 'true'.
# To set a boolean variable to 'false' set it to an empty value.
...
# Keep an older copy of the backup
# (mv $NETFS_PREFIX $NETFS_PREFIX.old before we copy the new version)
# empty means only keep current backup:
NETFS_KEEP_OLD_BACKUP_COPY=

So NETFS_KEEP_OLD_BACKUP_COPY='' in your luks.conf should help.

dragon299 commented at 2021-09-23 13:47:

Thank you for your fast support. That works great for us.

jsmeix commented at 2021-09-23 13:50:

@dragon299
thank you for your prompt feedback.
It helps us a lot to also get explicit feedback when things work.


[Export of Github issue for rear/rear.]