Host-based backup of VMware vSphere VMs.
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 »

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 »

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.
VP, Product Management
Posts: 27377
Liked: 2800 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. »

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 »

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.
VP, Product Management
Posts: 27377
Liked: 2800 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. » 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 » 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 »

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 »

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.
VP, Product Management
Posts: 27377
Liked: 2800 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. »

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

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 »

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.
VP, Product Management
Posts: 27377
Liked: 2800 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. »

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
VeeaMVP
Posts: 6166
Liked: 1971 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 » 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 -> 2022
Veeam VMCE #1
rgiovannelli
Novice
Posts: 4
Liked: never
Joined: Jun 03, 2016 3:48 pm
Full Name: Roberto Giovannelli
Contact:

[MERGED] Backup Oracle without RMAN

Post by rgiovannelli »

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.
VP, Product Management
Posts: 27377
Liked: 2800 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. »

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

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: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: pre/post freeze/thaw with linux hosts

Post by veremin »

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: Google [Bot] and 20 guests