From 32f2de1beac8f3dc41a1fd9bcc26e70877475633 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Tue, 28 Feb 2017 14:40:52 -0500 Subject: [PATCH] Restore Legacy Database Management doc Change I6d67e7a40e16468bb7bf4ac742361fb44eec4e28 incorrectly deleted a document that's required for operators who haven't yet upgraded to Ocata and are therefore still using the SQLAlchemy Migrate version of the glance-manage tool. This patch restores the file. Change-Id: I821fab32bffb2777a7a7c9e9d8f00ad0813bae64 --- doc/source/db-sqlalchemy-migrate.rst | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 doc/source/db-sqlalchemy-migrate.rst diff --git a/doc/source/db-sqlalchemy-migrate.rst b/doc/source/db-sqlalchemy-migrate.rst new file mode 100644 index 0000000000..6a511123a6 --- /dev/null +++ b/doc/source/db-sqlalchemy-migrate.rst @@ -0,0 +1,65 @@ +.. + Copyright 2012 OpenStack Foundation + All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + +Legacy Database Management +========================== + +.. note:: + This page applies only to Glance releases prior to Ocata. From Ocata + onward, please see :doc:`db`. + +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 + + +Sync the Database +----------------- + + glance-manage db sync + +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 + +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]: http://docs.openstack.org/ops-guide/ops-upgrades.html#perform-a-backup