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

be more strict about what we consider a valid backup directory #132

Open
blogh opened this issue Jun 22, 2020 · 4 comments
Open

be more strict about what we consider a valid backup directory #132

blogh opened this issue Jun 22, 2020 · 4 comments

Comments

@blogh
Copy link
Contributor

blogh commented Jun 22, 2020

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

@madtibo madtibo changed the title be more stick about what we consider a valid backup directory be more strict about what we consider a valid backup directory Jun 22, 2020
@madtibo
Copy link
Contributor

madtibo commented Jun 23, 2020

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??

@blogh
Copy link
Contributor Author

blogh commented Jun 23, 2020

Good catch, I completely missed the timezone thing.

@madtibo
Copy link
Contributor

madtibo commented Jun 23, 2020

Ah, no, we just filter by directory starting with digits.

No problem to create some stricter regex

@blogh
Copy link
Contributor Author

blogh commented Jun 24, 2020

I will try to work on this next week then.

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

No branches or pull requests

2 participants