Is there a simple way to export the data from a meteor deployed app?

后端 未结 12 2132
轻奢々
轻奢々 2020-11-30 16:30

Is there a simple way to export the data from a meteor deployed app?

So, for example, if I had deployed an app named test.meteor.com...

How could I easily d

12条回答
  •  误落风尘
    2020-11-30 17:07

    # How to upload local db to meteor:
    
    # -h = host, -d = database name, -o = dump folder name
    mongodump -h 127.0.0.1:3001 -d meteor -o meteor
    
    # get meteor db url, username, and password
    meteor mongo --url myapp.meteor.com
    
    # -h = host, -d = database name (app domain), -p = password, folder = the path to the dumped db
    mongorestore -u client -h http://production-db-a2.meteor.io:27017 -d myapp_meteor_com -p 'password' folder/
    

    While uploading local db to remote db, having an assertion Exception

    shubham@shubham-PC:$ mongorestore -u client -h http://production-db-a2.meteor.io:27017 -d myapp_meteor_com -p my_password local/
    2015-04-22T16:37:38.504+0530 Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 219
    2015-04-22T16:37:38.506+0530 0xdcc299 0xd6c7c8 0xd4bfd2 0x663468 0x65d82e 0x605f98 0x606442 0x7f5d102f8ec5 0x60af41 
     mongorestore(_ZN5mongo15printStackTraceERSo+0x39) [0xdcc299]
     mongorestore(_ZN5mongo10logContextEPKc+0x198) [0xd6c7c8]
     mongorestore(_ZN5mongo12verifyFailedEPKcS1_j+0x102) [0xd4bfd2]
     mongorestore(_ZN5mongo16ConnectionStringC2ENS0_14ConnectionTypeERKSsS3_+0x1c8) [0x663468]
     mongorestore(_ZN5mongo16ConnectionString5parseERKSsRSs+0x1ce) [0x65d82e]
     mongorestore(_ZN5mongo4Tool4mainEiPPcS2_+0x2c8) [0x605f98]
     mongorestore(main+0x42) [0x606442]
     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f5d102f8ec5]
     mongorestore() [0x60af41]
    terminate called after throwing an instance of 'mongo::AssertionException'
      what():  assertion src/mongo/client/dbclientinterface.h:219
    Aborted (core dumped)
    

提交回复
热议问题