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

后端 未结 12 2129
轻奢々
轻奢々 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

    To use an existing local mongodb database on your meteor deploy myAppName site, you need to dump, then restore the mongodb.

    Follow the instructions above to mongodump (remember the path) and then run the following to generate your 'mongorestore' (replaces the second step and copy/pasting):

    CMD=meteor mongo -U myAppName.meteor.com | tail -1 | sed 's_mongodb://\([a-z0-9\-]*\):\([a-f0-9\-]*\)@\(.*\)/\(.*\)_mongorestore -u \1 -p \2 -h \3 -d \4_'

    then

    $CMD /path/to/dump 
    

    From Can mongorestore take a single url argument instead of separate arguments?

提交回复
热议问题