mongodb-gcs-backup icon indicating copy to clipboard operation
mongodb-gcs-backup copied to clipboard

Misc tweaks

Open davidknoll opened this issue 5 years ago • 0 comments

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_QUIET option, on seeing how much log output the progress reporting generates when running under GKE, but then didn't actually use it.
  • Changing the .tar.gz extension 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>&1 where I pipe the output to tee, 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.
  • I needed to put quotes on something in the helm yaml to get it to deploy.

davidknoll avatar Jul 15 '20 11:07 davidknoll