Ask Your Question
0

How to export images? for backup

asked 2011-06-22 07:19:25 -0500

tonytkdk gravatar image

As title , Thinking about the backup of images.

Assume that glance host is complete dead , include the hard driver.

How can I restore image ?

And another condition is , while I want to provide same image of two different zones.... Is there any exist approach to do that?

I plan to build two zones like the diagram on my blog http://hugokuo-hugo.blogspot.com/2011/06/method-of-web-service-halb-in-openstack.html (http://hugokuo-hugo.blogspot.com/2011...)

Q1. Could two zones using one Glance+OBJ ?? Glance+OBJ+Volume controller

Q2. If I want to back up glance , the method is to backup sqlite file and /var/lib/glance/images ?

Thanks Hugo Kuo

edit retag flag offensive close merge delete

5 answers

Sort by » oldest newest most voted
0

answered 2011-07-08 13:33:51 -0500

jaypipes gravatar image

Ah! Sorry, I was a bit confused.... yes, you should be able to run:

glance-manage db_sync

And that should take care of it.

Cheers! jay

On Fri, Jul 8, 2011 at 9:26 AM, Hugo Kou question162300@answers.launchpad.net wrote:

Question #162300 on Glance changed: https://answers.launchpad.net/glance/...

   Status: Solved => Open

Hugo Kou is still having a problem: Hello Jay

thanks for your patient first.

DB : sqlite , /var/lib/glance/glance.sqlite

The reversion is 2011.3~bzr122-0ubuntu0ppa1~natty1

While I change to  2011.3~d3~20110701.151-0ubuntu0ppa1~natty1

Copy /var/lib/glance/glance.sqlite  and /var/lib/glance/images from older version to new version.

Failed to start up glance-registry service.

The problem is on DB , So that I guess the point is on DB tables already changed between these two version

Is there any way to migrate exist images from old version to the new one ?

Thanks


You received this question notification because you are a member of Glance Core, which is an answer contact for Glance.

edit flag offensive delete link more
0

answered 2011-07-08 13:22:30 -0500

tonytkdk gravatar image

Hello Jay

thanks for your patient first.

DB : sqlite , /var/lib/glance/glance.sqlite

The reversion is 2011.3~bzr122-0ubuntu0ppa1~natty1

While I change to 2011.3~d3~20110701.151-0ubuntu0ppa1~natty1

Copy /var/lib/glance/glance.sqlite and /var/lib/glance/images from older version to new version.

Failed to start up glance-registry service.

The problem is on DB , So that I guess the point is on DB tables already changed between these two version

Is there any way to migrate exist images from old version to the new one ?

Thanks

edit flag offensive delete link more
0

answered 2011-07-08 12:28:29 -0500

jaypipes gravatar image

On Fri, Jul 8, 2011 at 2:51 AM, Hugo Kou question162300@answers.launchpad.net wrote:

An additional question of Glance

Currently , the Glance version is 2011.3~bzr122-0ubuntu0ppa1~natty1 in our deployment. I have to build another cloud to replace exist one. But how could I get same version in this moment? I used to install trunk version before:< New reversion database seems do not match to 2011.3~bzr122-0ubuntu0ppa1~natty1... Is there any way to migrate images from exist to another?

Just to make sure I understand, are you asking how to migrate the registry database, or how to migrate where the images are stored in the backend?

-jay

edit flag offensive delete link more
0

answered 2011-07-08 06:49:17 -0500

tonytkdk gravatar image

Hello Jay...

I love your explanation , learned so much concept and knowledge in this QA post. I'll follow your suggestion for our nova deployment.

An additional question of Glance

Currently , the Glance version is 2011.3~bzr122-0ubuntu0ppa1~natty1 in our deployment. I have to build another cloud to replace exist one. But how could I get same version in this moment? I used to install trunk version before:< New reversion database seems do not match to 2011.3~bzr122-0ubuntu0ppa1~natty1... Is there any way to migrate images from exist to another?

Thanks Hugo

edit flag offensive delete link more
0

answered 2011-06-26 16:56:50 -0500

jaypipes gravatar image

Hi Hugo! I'll try answering each of your questions inline below. :)

On Wed, Jun 22, 2011 at 12:21 AM, Hugo Kou question162300@answers.launchpad.net wrote:

Assume that glance host is complete dead , include the hard driver.

How can I restore image?

The two Glance servers (API and registry) have different strategies for backup.

For the registry server, you will want to set up a MySQL or PostgreSQL replicated database server. Then, "restoring" the registry server would be:

a) Failover the actual registry database to the standby b) Start up a glance-registry instance on a new node, pointing at the standby/backup database

For the API server, the restore process depends on which backend storage adapter you use. For real production use, I recommend using the Swift storage backend, which provides highly-available storage that can withstand one or more storage nodes going completely down. When running an HA storage backend like Swift, you only need to spin up a new glance-api server somewhere and point your clients to the (possibly) new IP/port address of the new glance-api server.

If you are using the filesystem backend storage adapter in Glance (the default one), and the disk that images are being written to goes down, you don't have many choices UNLESS you have backed up the disk somewhere else, in which case you would restore the backed-up disk (or directory where the filesystem backend stores images (controlled by the filesystem_store_datadir config option).

And another condition is , while I want to provide same image of two different zones.... Is there any exist approach to do that?

Stand up a Glance server that both zones can query. Typically, you'd want to stand up a separate Glance server for "golden" or base images, and expose these images for users to reference when they initially start instances.

I plan to build two zones like the diagram on my blog http://hugokuo-hugo.blogspot.com/2011...

Q1. Could two zones using one Glance+OBJ ??      Glance+OBJ+Volume controller

They could, yes. Especially if the Glance server was backed by Swift.

Q2. If I want to back up glance , the method is to backup sqlite file and /var/lib/glance/images ?

As mentioned above, don't use SQLite for any production use. You will want to use MySQL or PostgreSQL and use the related replication technology (MySQL replication or Slony, for example) to do backups for your registry database.

Hope this helps! jay

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-06-22 07:19:25 -0500

Seen: 160 times

Last updated: Jul 08 '11