glance/doc/source/admin/db-sqlalchemy-migrate.rst
Nguyen Van Trung 97dbfb02d7 Add doc8 to pep8 check for glance project
This patch adds a doc8 check of .rst files to the current pep8 check.
It includes fixes to the .rst files that didn't pass the check.

Co-authored-By: Hoang Trung Hieu <hieuht@vn.fujitsu.com>
Change-Id: I5a9299200202576d97760ebf07bceb930888f2d7
2018-01-19 08:20:56 +00:00

2.1 KiB

Legacy Database Management

Note

This page applies only to Glance releases prior to Ocata. From Ocata onward, please see 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

Upgrades involve complex operations and can fail. Before attempting any upgrade, you should make a full database backup of your production data. As of Kilo, database downgrades are not supported, and the only method available to get back to a prior database version is to restore from backup[1].

[1]: https://wiki.openstack.org/wiki/OpsGuide/Operational_Upgrades#perform-a-backup