When creating a new database the syncdb command will need to be called to initialise the schema and insert the initial data fixtures.


python syncdb --noinput --all


Some of the upgrades to MyTardis will require that the database schema be upgraded to match the internal data model. This tool migrates data from old database schemas to the current one. It detects which version of the database you are currently running and will automatically migrate to the current version. If you decided not to use South for migrating the data models and have removed it from the list of INSTALLED_APPS in the file, you could skip this step and go on initiating an administrator account with the command createmysuperuser , which is described in more detail below.

In certain cases it is also necessary to update the permissions table.


Intial migration after syncdb --all:

python migrate --fake


python migrate

If the model changes require it, run:

python update_permissions

creating superuser

After success of database initialization or migration, please use a command line utility called createmysuperuser to create an administrator account using the admin site which is hooked to the URL /admin/.


python createmysuperuser


The backupdb command allows to backup and to restore of the MyTardis database. The command uses the corresponding database tool to facilitate this task. Currently implemented are PostgreSQL and MySQL. In case of backup, a directory called backups is created (if it does not exists) in the working directory. In case of restore, the database for storing the tablespace must already exist before loading the backup file into the database.


python backupdb

-r FILE, --restore=FILE
-h, --help