[Users] engine-backup --restore (was: Problems accesing the database)

Trey Dockendorf treydock at gmail.com
Wed Feb 12 18:10:58 UTC 2014


I tried this after upgrading to 3.4.0-beta2 and then attempting to
downgrade back to 3.3.3.

I performed an engine-cleanup, accepting defaults.

My backup on 3.3.3 was

$ engine-backup --mode=backup --scope=all
--file=engine-20140211-1457.tar.bz2 --log=engine-backup.log

$ engine-cleanup
<log attached>

$ engine-backup --mode=restore --scope=all
--file=engine-20140211-1457.tar.bz2 --log=engine-backup.log
Restoring...
FATAL: Database is not empty

What next?

- Trey

On Wed, Feb 12, 2014 at 12:03 PM, Yedidyah Bar David <didi at redhat.com> wrote:
> ----- Original Message -----
>> From: "Juan Pablo Lorier" <jplorier at gmail.com>
>> To: "Yedidyah Bar David" <didi at redhat.com>
>> Cc: "Sahina Bose" <sabose at redhat.com>, "users" <users at ovirt.org>
>> Sent: Wednesday, February 12, 2014 7:55:35 PM
>> Subject: Re: [Users] Problems accesing the database
>>
>> Hi Yedidyah,
>>
>> But If I run engine-setup and then engine-backup restore shuldn't it
>> import the data to the existing db created by engine-setup?
>> That's shown everywhere so I thought it's a valid way to migrate
>
> No.
>
> There is a specific case in which this works automatically:
> All on the same host:
> 1. engine-setup
> 2. engine-backup --mode=backup
> (perhaps do other stuff here)
> 3. engine-cleanup
> 4. engine-backup --mode=restore
>
> Why does this work? Because 'engine-cleanup', since 3.3, does not drop
> the database nor user inside postgres. So when restore tries to access
> this database using this user and password it succeeds.
>
> In general, if you do the restore on another machine, and do there
> 'engine-setup; engine-cleanup' as a quick-postgres-provisioning-tool,
> you end up almost ready, but not quite - because the password is random,
> and therefore different between the installations. In principle you could
> have provided just the password to restore, but we decided that if you
> need to change the credentials, you should pass all of them (except for
> defaults).
>
> Hope this clarifies,
> --
> Didi
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovirt-engine-remove-20140211190029.log
Type: application/octet-stream
Size: 696607 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140212/b4c438d4/attachment-0001.obj>


More information about the Users mailing list