简体   繁体   中英

meteor reset on a remote database

I've a self hosted meteor application and every I need to erase the database, I've to do it by hand. On my local machine I simply run meteor reset and the database gets erased. On the deploy machine meteor reset takes no effect at all, even with the environment variable MONGO_URL set.

Is it possible to use meteor reset on a remote database?

You can delete the app and redeploy it again:

meteor deploy -D yoursite.meteor.com

And deploy again:

meteor deploy yoursite.meteor.com

[edit] - misread your question. From my understanding, "meteor reset" only works against your mongo instance when it controls the instance. Since you're telling it that you are going to use your own instance (through setting MONGO_URL) it figures you'll manage it.

In that case, use mongo shell to connect to your mongo instance, then switch to the database and drop it.

use yourDatabaseName;
db.dropDatabase()

Docs are here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM