Consistent Backup of vPostgres DB

Discussions specific to VMware vSphere hypervisor

Consistent Backup of vPostgres DB

Veeam Logoby Nobody » Mon May 18, 2015 7:34 am

Hello Support

On vCenter 6.0, we will use the default vPostgres DB on our Windows vCenter.
What is Veeam suggesting to have a fully consistent backup of the DB without stoping any services?

Are there any plans to support the vPostgres DB directly?

Best regards
Andreas Girrbach
Nobody
Influencer
 
Posts: 10
Liked: never
Joined: Mon Apr 18, 2011 11:32 am
Full Name: Andreas Girrbach

Re: Consistent Backup of vPostgres DB

Veeam Logoby dellock6 » Mon May 18, 2015 7:49 am

Hi Andreas,
I'm not a PostgreSQL expert, but I was reading around for your same reasons, and found some info here: http://www.postgresql.org/docs/9.4/inte ... ackup.html

Looking at the three options, first of all file system level backup is not an option since it can only be done with the database in shutdown state. PG Dump seems to be a good solution, and looking at the commands seems it can be easily integrated with a pre-job script. This obsiously have the limit to restore the entire database at the same state of the time of the dump itself, but I think being it the database for vCenter, is good enough.
There's another option to do point-in-time backups which sounds similar to Oracle archive logs, but I don't honestly see the need to do so for the vCenter database, is more suited for other production uses of PostgreSQL.

Luca
Luca Dell'Oca
EMEA Cloud Architect @ Veeam Software

@dellock6
http://www.virtualtothecore.com
vExpert 2011-2012-2013-2014-2015-2016
Veeam VMCE #1
dellock6
Veeam Software
 
Posts: 5203
Liked: 1401 times
Joined: Sun Jul 26, 2009 3:39 pm
Location: Varese, Italy
Full Name: Luca Dell'Oca

Re: Consistent Backup of vPostgres DB

Veeam Logoby larry » Mon May 18, 2015 3:06 pm

If you come up with a script please post it. Would be nice to have a Veeam best practice way of backing up the vCenter Server Appliance. Will be doing the update when the dust settles on 6.0.
larry
Expert
 
Posts: 385
Liked: 90 times
Joined: Wed Mar 24, 2010 5:47 pm
Full Name: Larry Walker

Re: Consistent Backup of vPostgres DB

Veeam Logoby dellock6 » Mon May 18, 2015 10:01 pm

After a little bit of research, I've found VMware already has proper procedures and scripts available to backup the embedded postgreSQL of vCenter:
http://kb.vmware.com/kb/2091961
Just call the available scripts as pre-job activities in Veeam. One downside I see in the script is it creates a dump of the database thus consuming disk space, instead of simply preparing the database to be copied together with the entire VM.
Luca Dell'Oca
EMEA Cloud Architect @ Veeam Software

@dellock6
http://www.virtualtothecore.com
vExpert 2011-2012-2013-2014-2015-2016
Veeam VMCE #1
dellock6
Veeam Software
 
Posts: 5203
Liked: 1401 times
Joined: Sun Jul 26, 2009 3:39 pm
Location: Varese, Italy
Full Name: Luca Dell'Oca

Re: Consistent Backup of vPostgres DB

Veeam Logoby wRx7M » Thu Dec 31, 2015 12:40 am

I have successfully dumped the vcenter server vpostgres DB using the script but can't get it to run via the pre-job script section of my backup job. I have tried pointing to the bat on the VM guest (network share) and also on the Veeam server, locally. When I run the job, I get a warning "pre-job script terminated with exit code 1". What does this mean and how can I get it to work?
wRx7M
Lurker
 
Posts: 2
Liked: never
Joined: Fri Sep 20, 2013 6:03 pm
Full Name: Ryan Dougherty

Re: Consistent Backup of vPostgres DB

Veeam Logoby foggy » Tue Jan 05, 2016 12:51 pm

Ryan, can you check whether the script actually does what it is supposed to do when the job runs?

Also, here are some similar discussions, could help:
Pre / Post Job Scripts
Pre-job script terminated with exit
Is it possible to trigger a Veeam backup job from within
foggy
Veeam Software
 
Posts: 15623
Liked: 1164 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: Consistent Backup of vPostgres DB

Veeam Logoby Vitaliy S. » Wed Jan 06, 2016 11:54 am

You can trigger these scripts either via Veeam backup server or VMware Tools. Can you please check if triggering these scripts by enabling VMware Tools Quiescence option when creating VM snapshot solves this issue or not?
Vitaliy S.
Veeam Software
 
Posts: 20363
Liked: 1179 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Consistent Backup of vPostgres DB

Veeam Logoby giorgioC » Thu Sep 28, 2017 3:23 pm

The PostgreSQL manual says that if the snapshot is a "consistent snapshot" of the data folder (and I assume VMware snapshots are consistent here), the backup will be able to recovery thanks to its journaling system (WAL logs). Now, assuming the application is doing its job (aka using transitions properly), a DB backup can be safely done without any pre-scripts. Do I have understood correctly?
giorgioC
Lurker
 
Posts: 1
Liked: never
Joined: Thu Sep 28, 2017 1:41 pm
Full Name: Giorgio


Return to VMware vSphere



Who is online

Users browsing this forum: amano, giluccn and 1 guest