[Engine-devel] Backing up the DB

Eli Mesika emesika at redhat.com
Tue Apr 3 09:05:19 UTC 2012



----- 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



>  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
> 



More information about the Engine-devel mailing list