How to reset a mongodb instance on digitalocean


#1

I need to reset my mongo database. I used mupx to upload. Next time I will use compose.io but I did not this time so.
thanks


#2

You can reset the mongo database with this command: meteor reset


#3

Didn’t try:


#4

@ip76 not on a deployed app


#5

None of this worked any other ideas?


#6

Can you just delete the instance and re-deploy? This would give you a fresh database. Ideally if you had a snapshot of the app when it was first setup, you could revert back to that and re-deploy to get the updated app code.


#7

I use the following in my Meteor.startup

   var globalObject=Meteor.isClient?window:global;
    for(var property in globalObject){
        var object=globalObject[property];
        if(object instanceof Meteor.Collection){
            object.remove({});
        }
    }

Be sure to remove it right after.