[Engine-devel] Backing up the DB

Livnat Peer lpeer at redhat.com
Tue Apr 3 09:10:57 UTC 2012


On 03/04/12 12:05, Eli Mesika wrote:
> 
> 
> ----- Original Message -----
>> From: "Douglas Landgraf" <dougsland at redhat.com>
>> To: "Adam Litke" <agl at us.ibm.com>
>> Cc: engine-devel at ovirt.org, "Douglas Landgraf" <dlandgra at redhat.com>
>> Sent: Monday, April 2, 2012 6:19:23 PM
>> Subject: Re: [Engine-devel] Backing up the DB
>>
>>
>> Hi,
>>
>> On 04/02/2012 09:20 AM, Adam Litke wrote:
>>
>> Hi all,
>>
>> I have a working development environment for ovirt-engine and I want
>> to verify
>> someone else's gerrit change.  Is there a documented proceedure for
>> backing up
>> the engine db so that, after checking out the new code and updating
>> the db
>> schema, I can revert to my old code and DB (schema and data).
> 
> You can use pg_dump for backup and psql for restore :
> 
> backup:
> pg_dump -C -E UTF8  --column-inserts --disable-dollar-quoting  --disable-triggers -U postgres --format=p -f <backupfile>  <dbname>
> 
> restore:
> psql -U postgres -f <backupfile>  template1
> 
> 

Eli,
Can we have a script for backup and restore DB in the repo?

I see we have backup_db.sql any use of it?

Thanks, Livnat

> 
>>  Thanks! Usually I use this tool to backup/restore db:
>> https://github.com/dougsland/misc-rhev/blob/master/rhevm-db-tool.py
>>
>> However, since it's "rhevm" db tool.. need manually change the db
>> name to "engine",
>> I will rename it to engine-db-tool and update the code to 'engine'
>> soon..
>>
>> --
>> Cheers
>> Douglas
>> _______________________________________________
>> Engine-devel mailing list
>> Engine-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/engine-devel
>>
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel




More information about the Devel mailing list