Meteor application - reset the deployed application database

Is there an easy way to reset data from a deployed meteorite application?

So, for example, if I deployed an application called test.meteor.com - how could I easily reset to get the data that was collected by this application?

Locally, I run meteor reset , but I'm not sure what to do in the production process.

+79
mongodb meteor
Mar 23 '13 at 3:45
source share
4 answers

If you have an application with you, you can do this in your project directory

 meteor deploy test.meteor.com --delete meteor deploy test.meteor.com 

The first uninstall of the application, so everything is empty. The second deploys a new instance.

+107
Mar 23 '13 at 5:38
source share

one way is to go into the mongo instance yourself and delete the corresponding data so something like a collection:

 $ meteor mongo APP.meteor.com > db.users.drop() > db.xxx.drop() 

you could just dump the entire database, but that would confuse their env, and you should --delete application and redeploy it anyway.

 > db.dropDatabase() 
+42
Oct 29 '14 at 0:25
source share

I know this is a little outdated, but I just changed the name of my collection. so in your /lib/collections.js file

 someCollection = new Mongo.Collection("originalcollection"); 

becomes

 someCollection = new Mongo.Collection("newcollectionname"); 

this assumes, of course, that your application generates data for the database.

+3
Feb 09 '15 at 2:38
source share

You can simply access your meteor DB as

production-db-d2.meteor.io:27017/XYZ_meteor_com

where XYZ = your subdomain

for authentication use meteor auth (username and password)

You can access it from rockmongo , robomogo , mongoui , etc. tools.

To access from the command line

First authenticate by typing username, meteor password

$ meteor login

Then

$ meteor mongo XYZ.meteor.com

+1
Jul 26 '15 at 17:02
source share



All Articles