Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meteor reset command resets user profile #11175

Closed
inteldon opened this issue Sep 14, 2020 · 7 comments
Closed

meteor reset command resets user profile #11175

inteldon opened this issue Sep 14, 2020 · 7 comments
Labels
not-ready Something is missing, we are not able to work on this issue yet.

Comments

@inteldon
Copy link

I attempted to "reset" my meteor project and found that although my user details were preserved, all information in the "profile" section was erased.

@santiagopuentep
Copy link

To keep the database, copy the .meteor/local/db folder, do meteor reset and restore that folder. meteor reset is supposed to clear the database too, by design.

@SimonSimCity
Copy link
Contributor

SimonSimCity commented Sep 24, 2020

Calling meteor reset should remove the folder .meteor/local, including all the data, as described here https://docs.meteor.com/commandline.html#meteorreset.

Out of your description it sounds like you either 1) ran the command while your meteor application was running, 2) the client preserved your user-data in some way - some kind of client-side storage - e.g. indexdb or webstorage, or 3) you have a package installed which re-inserts your user details if missing.

Does this answer your question?

@inteldon
Copy link
Author

Thanks. What I did was run the reset command when the system stopped. I'm using a standard meteor application so to see all my databases get erased on the actual backend came as a surprise to me.

@SimonSimCity
Copy link
Contributor

If you do not want this to happen again, take a separate database.

  1. Start up a database (download and start an instance of MongoDB).
  2. Convert it to a replica set (https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set/) - If you miss out on this, you won't have the collection oplog which is crucial for Meteor.
  3. Run meteor as e.g. MONGO_URL=mongodb://localhost:27017/meteor meteor where localhost:27017 is where your database is running and meteor, the text after the slash of the host, is the name of the database in your MongoDB installation you want Meteor to use.

If you follow this, your data will be stored separate from your Meteor project, which will not be affected by running meteor reset and you could even host it and share it with colleagues.

But this also means that you have to update the database yourself if you have to. The version, which comes bundled with Meteor is updated as you update Meteor. Sometimes updating the database brings along some critical changes where you have to do some things manually - when downgrading later it's then easy to just call meteor reset and you have a working set - even though your data is lost. It's a choice you have to take when building and managing a system that THAT simple as Meteor.

@stale
Copy link

stale bot commented Nov 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Nov 1, 2020
@StorytellerCZ
Copy link
Collaborator

This is probably worth of a guide article.

@stale stale bot removed the stale-bot label Nov 3, 2020
@filipenevola
Copy link
Collaborator

As this is the expected behavior of meteor reset I'm closing this issue.

The command itself is well documented here https://docs.meteor.com/commandline.html#meteorreset but maybe we could have an article on how to use your custom MongoDB.

@filipenevola filipenevola added the not-ready Something is missing, we are not able to work on this issue yet. label Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-ready Something is missing, we are not able to work on this issue yet.
Projects
None yet
Development

No branches or pull requests

5 participants