Skip to main content

Meteor Mongodb Mup Commands

docker exec -it mongodb mongo

docker cp mongodb:dump/ce5-meteor .


If deployed with mup, you are in luck. You can find the steps here: https://github.com/xpressabhi/mup-data-backup

Here are the steps again:

MongoDB Data Backup deployed via mup

These commands run well only if meteor deployed with mup tool. Mup creates docker for mongodb hence taking backup becomes easy with these commands.

Backup

Take backup of running app data from docker then copy to local folder out of docker.

docker exec -it mongodb mongodump --archive=/root/mongodump.gz --gzip 
docker cp mongodb:/root/mongodump.gz mongodump_$(date +%Y-%m-%d_%H-%M-%S).gz

Copy backup to server

Move data to another server/local machine or a backup location

scp /path/to/dumpfile root@serverip:/path/to/backup

Delete old data from meteor deployment

Get into mongo console running in docker then drop current database before getting new data.

docker exec -it mongodb mongo appName
db.runCommand( { dropDatabase: 1 } )

Restore data to meteor docker

docker cp /path/to/dumpfile mongodb:/root/mongodump.gz
docker exec -it mongodb mongorestore --archive=/root/mongodump.gz --gzip

Comments

Popular posts from this blog

Meteor JS REST API

WRITE A POST Shahid Shaikh FOLLOW Engineer, Blogger from Mumbai. RESTful CRUD Operations in Meteor.js Published Dec 31, 2015 Last updated Jan 19, 2017 Introduction Meteor is a popular framework for building real-time web applications. We have already covered a tutorial which explains  how to build chat system using Meteor.js . In this tutorial, we will learn how to develop a RESTful API using Meteor which perform CRUD operations. Creating new project Create a new meteor project using the following command: meteor create appName Choose an application name of your choice. Once Meteor is done creating the project, you will see the directories and files created by Meteor in the folder name. We will not need them as of now, so we will delete all of those files and create whatever we need in the coming section. Installing iron-router In order to perform routing in Meteor, we will use  this awesome...

SSL No 2

Hom Let’s Encrypt SSL, Nginx, MUP → Deployment (Meteor) Nginx used for SSL setup Let’s Encrypt free SSL certificate: Use the instructions on this page to use OpenSSL to create your certificate signing request (CSR) and then to install your  SSL  certificate on your  Nginx  server. Restart Note: After you've installed your  SSL /TLS certificate and configured the server to use it, you must restart your  Nginx  instance. Let’s start by generating Add a A Record in your domain’s DNS Settings Setting up Let’s Encrypt ssh into your server console and run following commands $ wget https://dl.eff.org/certbot-auto $ chmod a+x certbot-auto $ ./certbot-auto certonly -d yourdomain.com --standalone After successful execution of the last command you can see your Certificate & Key generated in /etc/letsencrypt/yourdomain.com Setting up Nginx Let’s install nginx which ...