-
Notifications
You must be signed in to change notification settings - Fork 10
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
Databases: add support for zip archiving #97
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, Akarys!
A few problems:
- Handler is not well enough documented. Please add some block comments explaining what you're doing.
- I'm not sure about calling this storage type zip. Sure, we're zipping the backup, but we're storing it locally. So I would argue that semantically, it makes more sense for the storage type to be something like "local storage". The fact that we zip it is an implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting closer.
README.md
Outdated
@@ -277,7 +277,7 @@ databases: | |||
|
|||
## Databases | |||
|
|||
Right now, this app supports **MongoDB**, **PostgreSQL 13**, **MariaDB**, **Redis** and **Zip archiving**. If | |||
Right now, this app supports **MongoDB**, **PostgreSQL 13**, **MariaDB**, **Redis** and **LocalStorage archiving**. If |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels weird, and may be confused with localStorage
, the HTML5 feature.
Let's just make it local storage archiving without capital letters.
README.md
Outdated
@@ -371,14 +371,21 @@ Identifiers can be any string of your choosing. | |||
port: "6379" | |||
``` | |||
|
|||
### Zip archiving | |||
### Local Storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's do Local storage
here.
elif file.is_dir(): | ||
directories.append(file) | ||
for file in path.rglob("*"): | ||
if file.is_file(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line irks me a bit. why did we name the variable file
if we have to check to make sure it is a file? that's why my suggestion had subpath
, but I'm open to other more "zoomed out" alternatives. I just don't think we should name something file and then check if it's a file.
787587e
to
75f293e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks viable. Let's gooo.
Closes #87
This commit adds support for recursively storing a local file as a Zip file.