glance/doc/source/db.rst
Xi Yang 738f860c00 Capitalize 'glance' in db.rst
The 'glance' should be capitalized in db.rst as
other docs did.

Change-Id: Id3c3fd7d12da89eeadcea1a87bbdab1f01b25034
2015-12-04 23:20:30 +08:00

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.