forked from juantoman/MyClassGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackup_mongo.txt
More file actions
44 lines (26 loc) · 941 Bytes
/
backup_mongo.txt
File metadata and controls
44 lines (26 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
First you need to spin up meteor.
Then if you run
meteor mongo
you will get an output something like this:
MongoDB shell version: 2.2.1
connecting to: 127.0.0.1:3001/meteor
Meteor db host is at 127.0.0.1 with a port of 3001.
Exit the mongo shell and use mongodump from your terminal.
mongodump -h 127.0.0.1 --port 3001 -d meteor
Restore your database to mlab:
mongorestore -h ds247270.mlab.com:47270 -d mcg -u mcg dump/meteor
Recuperar datos de backup:
--------------------------
mongodump -h ds247270.mlab.com:47270 -d mcg -u mcg -o dump
//Parar meteor
meteor reset
//Iniciar Meteor
mongorestore -h 127.0.0.1 --port 3001 -d meteor --drop dump/mcg
mongorestore -d app --drop meteor
Comprimir y descomprimir carpeta:
---------------------------------
tar -zcvf mcg.tar.gz dump
tar -zxvf mcg.tar.gz
Copiar ficheros scp:
--------------------
scp juantoman@moodle.iestacio.com:/home/juantoman/MyClassGame/mcg.tar.gz mcg.tar.gz