-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Feature/enhance backup script #4833
base: staging
Are you sure you want to change the base?
Feature/enhance backup script #4833
Conversation
This adds a THREADS like env var and it makes the script skip the creation of the ${DATE} folder.
This adds a "help" text, so the user knows their options. Calling just the script will now tell the user to either user 'backup', 'restore', or 'help'.
Nice nice. But one question i have left somewhere in my brain :D :
|
Okay that is an absolutely valid question! I'll test it out ASAP and report back/fix my branch. |
Totally valid point. I suppose the var support could be added here too but... I mean, shouldn't the user just point the script to a folder, such as let's say I am saying this with utmost respect, this is your work, your project. For sanity check, like "to make sure this is a proper backup folder", I would probably change the script again (yeah, I know, I should just close my account, sorry). Let's say put a "mailcow_backup.txt" within the folder, And the content would be like:
But then you also have the specific backup modes, like when you only backup some part, and not 'all'. I am just thinking out loud, so to say. Let me know if you have any ideas... |
Yeah i think this is the way we want to go. Not all users want to use a bucket for backup savings and therefore the policys. So i guess to make everyone happy we´ll simply add the variable. |
I'll add it then in a moment. Thank you. |
Good man. I actually was about trying to do this as well. But please feel free. |
No u. Seriously, it's your project, you know how you like this to be implemented. And thank you for not forgetting about this, appreciate it! |
Yes but please do that though I've deleted the things (which were not many to be honest) because I'm not sure how to implement it. |
I tested it in Virtualbox with my own live server backups and it seemed to restore fine like this. I'm not sure if the help/explanation is enough, feel free to add more, change wording, etc.
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.
See comment :)
Besides that it's "mailcow" and it needs a doc PR. |
Sorry @andryyy , could you elaborate, please? Thank you! |
Apparently I changed the problematic for loop on the VM, but I forgot to copy the script back to the git folder before committing. I put the for loop into the IF branches now. TESTING IS UNDERWAY - I will comment again once it is 100% verified working (for me, again, sorry.)
Okay so I tested it, it worked for me (NODATE=1), please verify once time allows. Thank you. |
What @andryyy was saying is that firstly the "Mailcow" Names inside your PR have to be called "mailcow" with a small M and secondly that this new Parameter needs a entry in the mailcow docs repo: https://github.com/mailcow/mailcow-dockerized-docs |
mailcow is mailcow.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Why is this PR blocked? Is the only thing missing the documentation? |
Will this PR ever be merged? I'm really interested in the |
Sorry that I make another appearance regarding this script. I use it a lot and the latest THREADS was a great improvement.
This time, I added two things:
This skips the creation of the timestamp folder. Why? If you back up via s3fs, or backblaze/s3 client, you may opt for overwriting your backup files, and store them with the same name. This way, you can use bucket policy to practically never run out of disk space (well, never run out of money) and still have several snapshots available.
Usage: Specifying any value, such as NODATE=1 will work.
Adds a new option the user can call to see what the script can actually do.
It can be called with ".sh help", or if the user simply calls the script without any argument, the script now tells them about this.
Feel free to change NODATE's name, or the text of help, of course. This worked for me, but I'm just a user of this great project. Thank you guys for your continued work on Mailcow!