Version tracking the database


#1

I switch between my personal laptop and work laptop on a daily basis. During the prototyping of this Meteor app, it would be helpful to just include the mongo db in my git repo.

I haven’t tried yet; are there potential problems with doing so? What would be the best way to include it? I.e. change /.meteor/.gitignore:

  • local
  • local/build
  • local/isopacks
  • local/shell

Thoughts?


#2

You should not do that. It is a binary file which is not meant to be shared. Besides, it is huge!

Also all those other build files etc within the local directory are also not meant to be shared.

You have two options to achieve your goal:

a) use an external mongodb, perhaps a hosted system on a free-tier mongo hosting service
b) use fixture files and migrations so that you can quickly set up your development environment


#3

Gotcha. Yeah, I hadn’t realized that the db files were big binaries.

I wouldn’t track any of the other directories in local (as described above).