Discussions specific to the VMware vSphere hypervisor
Post Reply
steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

Database backups - pre/post etc

Post by steelnwool » Jul 16, 2015 1:38 pm

Hi,

All machines referenced below are running Linux.

In my infrastructure I have Oracle/MySQL/PostgreSQL databases.

To back them up, I do not want to quiesce the databases, I’d much rather run RMAN/mysqldump/pgdump.

I’m thinking of either

a: Running those scripts via cron on the actual linux machines about 1 or 2 hours before the Veeam job is scheduled to run.

b: using the pre-freeze/post-freeze scripts, but really only using the pre one to make a dump just before i do my backup.

Thoughts/recommendations?

steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

[MERGED] pre/post freeze/thaw with linux hosts

Post by steelnwool » Jul 16, 2015 2:00 pm

Hi,

Is it possible to run pre/post scripts for linux hosts without quiescing the files systems ? I basically want to run "other" type of maintenance scripts before the backup begins. Thanks.

Vitaliy S.
Product Manager
Posts: 22874
Liked: 1540 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by Vitaliy S. » Jul 16, 2015 2:26 pm

File system is not quiescenced if you're using built-in capabilities of triggering scripts for Linux VMs, pre-freeze script is triggered when your backup job creates a snapshot for the VM in question. As regards quiescencing, then it is done only when you enable VMware Tools quiescence option.

steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by steelnwool » Jul 16, 2015 2:32 pm

Vitaliy S. wrote:File system is not quiescenced if you're using built-in capabilities of triggering scripts for Linux VMs, pre-freeze script is triggered when your backup job creates a snapshot for the VM in question. As regards quiescencing, then it is done only when you enable VMware Tools quiescence option.
The first line of the link you posted says this :

If you plan to back up VMs running applications that do not support VSS, you can instruct Veeam Backup & Replication to run custom pre-freeze and post-thaw scripts for these VMs. Pre-freeze scripts quiesce the VM file system and application data

-- To me this imples that it DOES quiesce the file system. Am I mis reading you, or the page?

Vitaliy S.
Product Manager
Posts: 22874
Liked: 1540 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by Vitaliy S. » Jul 16, 2015 2:34 pm 1 person likes this post

Pre-freeze scripts quiesce the VM file system and application data to bring the VM to a consistent state before Veeam Backup & Replication triggers a VMware VM snapshot.
This line just shows what these scripts can be used for. For example, if you specify the script that simply writes some text to the file, file system will not be quiescenced. This script will just create a file prior creating a VM snapshot.

loelly
Enthusiast
Posts: 51
Liked: 10 times
Joined: Apr 17, 2014 8:25 am
Full Name: Jens Siegmann
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by loelly » Jul 17, 2015 8:57 am 2 people like this post

I have a whole bunch of Linux Oracle servers and I'm using pre-freeze and post-thaw scripts. It works great. Just don't tick the "Quiesce" option in the Veeam job properties. The scripts will get executed if located at the right point in the file system and if VMware Tools are installed and running every time a snapshot is created.

Just right before creation, pre-freeze is execute, right after *creation* post-thaw is executed, so in my case the database just stays in backup mode for a couple of seconds.

I'm just backing up the database once a day. For a more granular archive log backup, I've set up a mount point and copy over the archive logs every fifteen minutes.

steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by steelnwool » Jul 21, 2015 12:51 pm

loelly wrote:I have a whole bunch of Linux Oracle servers and I'm using pre-freeze and post-thaw scripts. It works great. Just don't tick the "Quiesce" option in the Veeam job properties. The scripts will get executed if located at the right point in the file system and if VMware Tools are installed and running every time a snapshot is created.

Just right before creation, pre-freeze is execute, right after *creation* post-thaw is executed, so in my case the database just stays in backup mode for a couple of seconds.

I'm just backing up the database once a day. For a more granular archive log backup, I've set up a mount point and copy over the archive logs every fifteen minutes.
Once a day is fine for me too. I usually rsync my archive logs to another server.

Questions;

1: Are you using the scripts in "Storage -> Advanced -> Advanced" or "Guess Processing -> 'Enable Application Aware Processing' -> Choose a machine -> Scripts" ?
2: Would you mind sharing your pre-freeze/post-thaw scripts?

Thanks!

steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by steelnwool » Jul 21, 2015 12:54 pm

Oh, and during that few seconds that the database is in backup mode.... if applications are still connected to it and someone is using the application will they notice? My applicaitons do not do a huge number of transactions. I suspect they'll just go into the archive logs and get read into the db after backup mode is de-activated?

Vitaliy S.
Product Manager
Posts: 22874
Liked: 1540 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by Vitaliy S. » Jul 21, 2015 2:59 pm

It depends on the application and how interaction with the database is performed. You need to run a test and see the impact (if any).

loelly
Enthusiast
Posts: 51
Liked: 10 times
Joined: Apr 17, 2014 8:25 am
Full Name: Jens Siegmann
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by loelly » Jul 22, 2015 2:08 pm 1 person likes this post

Hi Jeff,

1: no, I just created /usr/sbin/pre-freeze-script and /usr/sbin/post-thaw-script there and put root:root and 755 on each. These are basically wrapper scripts which call other scripts run by Oracle DBA to put the database in backup mode.

2: Sorry, I cannot share these, but the you just need to figure out how to put the database in hot backup mode and put that into the script. Do not forget to do this as oradba.

3: No, hot backup mode is transparent to application. Every read will come from DB files and every write will go to the logs. But as Vitaly noted, you might to test this.

All the best, happy scripting!

steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by steelnwool » Jul 22, 2015 2:16 pm

Thanks very much! Appreciated!

steelnwool
Enthusiast
Posts: 30
Liked: 1 time
Joined: Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by steelnwool » Jul 22, 2015 5:33 pm

loelly wrote:Hi Jeff,

1: no, I just created /usr/sbin/pre-freeze-script and /usr/sbin/post-thaw-script there and put root:root and 755 on each. These are basically wrapper scripts which call other scripts run by Oracle DBA to put the database in backup mode.
Does this still work with v8? I just created both of those scripts and made sure they were 755'd.. neither ran.

Vitaliy S.
Product Manager
Posts: 22874
Liked: 1540 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by Vitaliy S. » Jul 22, 2015 8:05 pm

Veeam B&R version does not matter here, since these scripts are triggered as a part of VMware Tools quiescence option. Please check out this blog post for more info > http://www.hiperlogic.com/blog/?p=803

On a side note, try to use your proposed variant ("Storage -> Advanced -> Advanced" or "Guess Processing -> 'Enable Application Aware Processing") of triggering scripts, should work.

dellock6
Veeam Software
Posts: 5718
Liked: 1610 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by dellock6 » Jul 22, 2015 11:25 pm 1 person likes this post

You do not need to crawl the internet or do tests to find Oracle scripts for backup mode, we covered this as part of the whitepaper we published on Oracle protection: http://www.veeam.com/wp-veeam-data-prot ... ments.html
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2019
Veeam VMCE #1

rgiovannelli
Certified Trainer
Posts: 4
Liked: never
Joined: Jun 03, 2016 3:48 pm
Full Name: Roberto Giovannelli
Contact:

[MERGED] Backup Oracle without RMAN

Post by rgiovannelli » Jun 03, 2016 3:58 pm

Hi all,
if I don't want install RMAN and Oracle is in archive log mode, How do I make an application consistent backup on non-windows Oracle (v.11 or v.12) machine with Veeam?
How do I set the backup job?
Have I to use a pre-freeze and post-freeze shell scripts?

Thanks lot in advance

Roberto

Vitaliy S.
Product Manager
Posts: 22874
Liked: 1540 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by Vitaliy S. » Jun 03, 2016 4:15 pm

You need to use pre-freeze and post-thaw scripts with VMware Tools Quiescence enabled. For more information please take a look at the URL which Luca has posted above.

rgiovannelli
Certified Trainer
Posts: 4
Liked: never
Joined: Jun 03, 2016 3:48 pm
Full Name: Roberto Giovannelli
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by rgiovannelli » Jun 05, 2016 12:03 pm

Thank you Vitaliy
In Veeam verrsion 9, have I to use pre-freeze and post-thaw scripts in linux machine if I don't use RMAN?

veremin
Product Manager
Posts: 16789
Liked: 1410 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by veremin » Jun 06, 2016 9:40 am

Correct. Kindly, download the said document and check it, information provided there covers your question quite precisely. Thanks.
When Oracle is installed and running on an operating system with no VSS support, like Linux, you can guarantee database consistency using scripts.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 12 guests