question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Backup and restore mongodb

See original GitHub issue

This is a feature request. It would be nice to run

mup dumpdb path/to/dest/

which would run mongodump on the server, and transfer the generated file into the dest directory.

mup restoredb path/to/dump

which would take the given dump and restore it into the database.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:25
  • Comments:20 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
xpressabhicommented, Oct 31, 2017

Backup and restore can be achieved via these steps , still having inbuild option in mup will do no harm. https://github.com/xpressabhi/mup-data-backup/

1reaction
eric-burelcommented, Nov 2, 2018

Hi everybody,

I am trying to write a plugin to enable daily mongo backup on AWS. You can take a look at the code: https://github.com/lbke/vulcan-mongo-backup Though its not very general (tied to AWS and Vulcan.js) it could be a starting point if your database is colocated with your app.

My current solution consists in running mongodump in a cron job initiated by my app, which means installing mongodump within the Docker container and not directly on the server.

But… I can’t get it to work. Here is my config, for an Ubuntu server, based on those instructions:

    docker: {
      image: "abernix/meteord:node-8.4.0-base",
      // install mongodump to allow programmatic backups
      buildInstructions:[
        'RUN'
        + ' apt-get install -y apt-transport-https libwebsockets-dev libssl-dev openssl libcurl3' // allow to download the key / need for mongo install to work
        + ' && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4' 
        + ' && echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list'
        + ' && apt-get update'
        + ' && apt-get install -y mongodb-org mongodb-org-tools'
      ]
    },

It fails at finding libssl, which seems necessary for the install to work. But the idea is there.

Hope it can help soemhow and someone manages to add a db backup feature to Meteor Up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Back Up and Restore with MongoDB Tools
The mongorestore utility restores a binary backup created by mongodump . By default, mongorestore looks for a database backup in the dump/ directory....
Read more >
MongoDB - Backup and Restoration - GeeksforGeeks
In MongoDB, mongorestore utility is used to restore the backup data. It restores the binary backup created by mongodump utility(i.e., BSON data ...
Read more >
MongoDB Backup and Restore - w3resource
The restore utility using mongorestore command restores a binary backup created by mongodump. The mongorestore can restore either an entire ...
Read more >
How To Back Up, Restore, and Migrate a MongoDB Database ...
While you can use the import and export functions to backup and restore your data, there are better ways to ensure the full...
Read more >
Ultimate Mongodump Guide: 8 Easy Steps to Backup MongoDB
Steps to Backup & Restore Data using Mongodump · Step 1: Create Direct Backups Using Mongodump · Step 2: Backup a Remote MongoDB...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found