Next: , Previous: Tutorial, Up: Tutorial


2.3 Creating a Database

The first step Jim, Abe and Beth each need to perform is to create a new database. This is done with the mtn db init command, providing a --db option to specify the location of the new database. Each programmer creates their own database, which will reside in their home directory and store all the revisions, files and manifests they work on. Monotone requires this step as an explicit command, to prevent spurious creation of databases when an invalid --db option is given.

In real life, most people prefer to keep one database for each project they work on. If we followed that convention here in the tutorial, though, then all the databases would be called juicebot.mtn, and that would make things more confusing to read. So instead, we'll have them each name their database after themselves.

Thus Jim issues the command:

     $ mtn db init --db=~/jim.mtn

Abe issues the command:

     $ mtn db init --db=~/abe.mtn

And Beth issues the command:

     $ mtn db init --db=~/beth.mtn