pitrery
pitrery copied to clipboard
be more strict about what we consider a valid backup directory
hi,
Since we create backup directory with the format : YYYY.MM.DD_HH.MM.SS
We should filter valid backup directories with the same criteria instead of [0-9]*
A second criteria should be the presence of a backup_timestamp file.
toughts ?
Benoit
Edit: HH_MM_SS => HH.MM.SS
Salut Benoit,
I agree to be more strict with backup names.
Be careful that backup_name depends on $USE_ISO8601_TIMESTAMPS.
Thus, backup_name could be of the form:
$ stop_time="2020-06-07 02:06:04 CEST"
$ date -d "$stop_time" +"%FT%T%z"
2020-06-07T02:06:04+0200
$ echo $stop_time | awk '{ gsub(/[:-]/, "."); print $1"_"$2 }'
2020.06.07_02.06.04
It seems to me that purge might not work with USE_ISO8601_TIMESTAMPS activated??
Good catch, I completely missed the timezone thing.
I will try to work on this next week then.