mongodb-gcs-backup
mongodb-gcs-backup copied to clipboard
Misc tweaks
I started using this a while ago at work, and wondered if you would be interested in any of this commit. I haven't done a PR, because I made other local changes at the time and there is a caveat about logging.
- I added a
MONGODB_QUIEToption, on seeing how much log output the progress reporting generates when running under GKE, but then didn't actually use it. - Changing the
.tar.gzextension of the output archives, as it's not a tarball, it's actually a binary format specific to mongodump.- In fact even the version of the mongo tools affects it- eg dumps taken using the mongo 4.2 tools inside the 0.2.0 docker image, in my testing were not understood by a 4.0 mongorestore even though the backup was taken from a 4.0 server.
- Keep the log output as it goes (using
tee), and in the event of an error, emit the last line of that on Slack. I had noticed that the errors outputted to Slack otherwise amounted to "something went wrong", but gave me little idea what went wrong.- The caveat of what I did here, is that the
2>&1where I pipe the output totee, also means the logs aren't differentiated between stdout/stderr when output to the console, and therefore aren't differentiated between info/error in my GKE logs.
- The caveat of what I did here, is that the
- I needed to put quotes on something in the helm yaml to get it to deploy.