Coder Social home page Coder Social logo

birotaio / mongodb-gcs-backup Goto Github PK

View Code? Open in Web Editor NEW
29.0 5.0 24.0 9 KB

Backup MongoDB using mongodump and upload the generated archive to GCS

License: MIT License

Shell 62.49% Smarty 25.75% Dockerfile 11.75%
mongo-db mongo-oplog mongo-tools backup-script google-cloud-storage kubernetes-deployment

mongodb-gcs-backup's People

Contributors

cmorent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mongodb-gcs-backup's Issues

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_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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.