pre/post freeze/thaw with linux hosts

VMware specific discussions

Database backups - pre/post etc

Veeam Logoby steelnwool » Thu 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: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

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

Veeam Logoby steelnwool » Thu 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.
steelnwool
Enthusiast
 
Posts: 30
Liked: 1 time
Joined: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby Vitaliy S. » Thu 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.
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby steelnwool » Thu 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?
steelnwool
Enthusiast
 
Posts: 30
Liked: 1 time
Joined: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby Vitaliy S. » Thu 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.
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby loelly » Fri 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.
loelly
Enthusiast
 
Posts: 49
Liked: 10 times
Joined: Thu Apr 17, 2014 8:25 am
Full Name: Jens Siegmann

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby steelnwool » Tue 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: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby steelnwool » Tue 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?
steelnwool
Enthusiast
 
Posts: 30
Liked: 1 time
Joined: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby Vitaliy S. » Tue 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).
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby loelly » Wed 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!
loelly
Enthusiast
 
Posts: 49
Liked: 10 times
Joined: Thu Apr 17, 2014 8:25 am
Full Name: Jens Siegmann

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby steelnwool » Wed Jul 22, 2015 2:16 pm

Thanks very much! Appreciated!
steelnwool
Enthusiast
 
Posts: 30
Liked: 1 time
Joined: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby steelnwool » Wed 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.
steelnwool
Enthusiast
 
Posts: 30
Liked: 1 time
Joined: Fri Sep 03, 2010 4:44 pm
Full Name: Jeff MacDonald

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby Vitaliy S. » Wed 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.
Vitaliy S.
Veeam Software
 
Posts: 19564
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: pre/post freeze/thaw with linux hosts

Veeam Logoby dellock6 » Wed 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
EMEA Cloud Architect @ Veeam Software

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

[MERGED] Backup Oracle without RMAN

Veeam Logoby rgiovannelli » Fri 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
rgiovannelli
Certified Trainer
 
Posts: 4
Liked: never
Joined: Fri Jun 03, 2016 3:48 pm
Full Name: Roberto Giovannelli

Next

Return to VMware vSphere



Who is online

Users browsing this forum: No registered users and 13 guests