glance/doc/source/db.rst
AmalaBasha 7e6319d955 glance-manage should work like nova-manage
nova-manage supports subcommands of db, for nova-manage,
eg) 'nova-manage db sync',
glance manage however has individual commands like db_sync, db_version
etc. This patch aims at adding the db operations as subcommands to db in
glance-manage similar to nova and refactoring this bit of code in
cmd/manage.py

Fixes: bug 1213197
Change-Id: I6fad31766bc1cec2a666a7ebc8df5c732007c5f1
2013-11-06 14:59:33 +05:30

1.7 KiB

Database Management

The default metadata driver for glance uses sqlalchemy, which implies there exists a backend database which must be managed. The glance-manage binary provides a set of commands for making this easier.

The commands should be executed as a subcommand of 'db':

glance-manage db <cmd> <args>

Sync the Database

glance-manage db sync <version> <current_version>

Place a database under migration control and upgrade, creating it first if necessary.

Determining the Database Version

glance-manage db version

This will print the current migration level of a glance database.

Upgrading an Existing Database

glance-manage db upgrade <VERSION>

This will take an existing database and upgrade it to the specified VERSION.

Downgrading an Existing Database

glance-manage db downgrade <VERSION>

This will downgrade an existing database from the current version to the specified VERSION.