#1074 Issue closed: Use date prefixed backup archive filenames in any case?

Labels: enhancement, documentation, fixed / solved / done

jsmeix opened issue at 2016-11-21 12:47:

With BACKUP_TYPE=incremental or BACKUP_TYPE=differential
all backup archives have a date prefix.

Full backups are of the form YYYY-MM-DD-HHMM-F.tar.gz
where the 'F' denotes a full backup.

Incremental backups are of the form YYYY-MM-DD-HHMM-I.tar.gz
where the 'I' denotes an incremental backup.

Differential backups are of the form YYYY-MM-DD-HHMM-D.tar.gz
where the last 'D' denotes a differential backup.

The advantage of the date prefix is that
there is no longer the need for an explicit
NETFS_KEEP_OLD_BACKUP_COPY
because all backup archives have different file names
so that no old one gets overwritten.

In other words, with BACKUP_TYPE=incremental
or BACKUP_TYPE=differential there is implicitly
a NETFS_KEEP_OLD_BACKUP_COPY functionality.

Now I wonder if we should also use a date prefix
for the normal backup (currently "backup.tar.gz")
and treat that case exactly the same as the "full backup" case
for BACKUP_TYPE=incremental/differential.

In short:
I ask if BACKUP_TYPE="" should result a backup archive
of the form YYYY-MM-DD-HHMM-F.tar.gz

Of course if during "rear recover"
there is no YYYY-MM-DD-HHMM-F.tar.gz
it would fall back using backup.tar.gz
more precisely:
$BACKUP_PROG_ARCHIVE$BACKUP_PROG_SUFFIX$BACKUP_PROG_COMPRESS_SUFFIX

gdha commented at 2016-12-13 08:35:

@jsmeix The variable NETFS_KEEP_OLD_BACKUP_COPY is not obsolete as most users do not use the incremental/differential backup types. They just want a save copy of their weekly tar-ball.

gdha commented at 2016-12-13 08:47:

@jsmeix And, to answer your question if BACKUP_TYPE="" should we use the form YYYY-MM-DD-HHMM-F.tar.gz : I am not in favour as with lots of users it could fill up disk space if they do not clean-up in time. Especially in environments where they have thousands of Linux systems.

jsmeix commented at 2016-12-13 09:10:

I did not mean to obsolete NETFS_KEEP_OLD_BACKUP_COPY.
I only meant that with date prefixed backup archive filenames
one gets a KEEP_OLD_BACKUP functionality "for free".

I agree that by default we should not use date prefixed backup
archive filenames because users who like to use that can specify
it manually in their local.conf as they like, for example via

BACKUP_PROG_ARCHIVE="$( date '+%Y-%m-%d-%H%M' )-F"

to get the same full backup file name for BACKUP_TYPE=""
as what would be used for BACKUP_TYPE=incremental
or BACKUP_TYPE=differential.

I think I will add a explanatory comment to default.conf
about that issue.

gdha commented at 2016-12-13 09:56:

Excellent idea as even I was doubting ;-)

jsmeix commented at 2016-12-13 13:40:

Documented via
https://github.com/rear/rear/pull/1123


[Export of Github issue for rear/rear.]