Truncate Oracle Archive Logs immediately after shipping

Availability for the Always-On Enterprise

Truncate Oracle Archive Logs immediately after shipping

Veeam Logoby franzr77 » Fri Oct 28, 2016 7:36 am

We are backing up an Oracle 12 Database with Veeam. Everything works fine so far but we have a problem with the configuring of the truncation of the transaction logs.

we defined that all transaction-logs that are older than 1 hour should be truncated. this truncation happens only after a full or incremental backup run and not during the 15min interval of the log-shipping task whicht runs during the day. so when we do intensivwe write operations we we would run out of disk space because the logs of the whole day are lying around and not been truncated.

is ist possible to force the deletion of the archive-log-files which have already been shipped to the repositore?
franzr77
Novice
 
Posts: 5
Liked: never
Joined: Fri Oct 28, 2016 7:24 am
Full Name: Franz Rauscher

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby PTide » Fri Oct 28, 2016 8:40 am

Hi and welcome to the community!

No, this cannot be done via Veeam job settings and this is by design. The reason for such behaviour is that without the latest state of the VM there is nowhere to apply logs to thus if you truncate logs on the source before getting a full image of the source then you'll not be able to perform point in time recovery if something goes wrong on the production.

Thanks
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby franzr77 » Fri Oct 28, 2016 9:20 am

But the logs are shipped to the Repository during the day with the Logshipping-Job so for what do you need the logs on the DB-Server in case of restore?

To clarify. I want to remove the Logs from the DB-Server after they where shipped to the repository. So this logs could be restored. The logs on the db-server are not necessary for a pointintime restore because i have all the logs in the repository
franzr77
Novice
 
Posts: 5
Liked: never
Joined: Fri Oct 28, 2016 7:24 am
Full Name: Franz Rauscher

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby PTide » Fri Oct 28, 2016 10:15 am

I've double-checked with QA team and I have to admit that I was wrong regarding the way point-in-time restores work, sorry for confusion.

If you want to delete logs that have been already shipped to a repository you can either do it manually via script or via RMAN. Please check this thread for more information on the subject.

Thanks
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby franzr77 » Fri Oct 28, 2016 10:23 am

Thanks for the Thread but my question t this solution is: how do i know which files are shipped successfully? when i delete all files that are older than 1h and the Redo Log Shipping Job has a problem than i cannot restore anymore. is ther a way to get a list of all shipped archive-logs via api or powershell or something like taht?
franzr77
Novice
 
Posts: 5
Liked: never
Joined: Fri Oct 28, 2016 7:24 am
Full Name: Franz Rauscher

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby PTide » Fri Oct 28, 2016 12:24 pm

What OS do you use, Linux or Windows?
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby franzr77 » Fri Oct 28, 2016 12:34 pm

Windows 2012R2
franzr77
Novice
 
Posts: 5
Liked: never
Joined: Fri Oct 28, 2016 7:24 am
Full Name: Franz Rauscher

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby PTide » Fri Oct 28, 2016 2:32 pm

There should be "C:\ProgramData\Veeam\Backup\OracleLogBackup\" folder on the Oracle server. Each time the log-job starts it creates an .xml file in that folder and deletes it after the log has been shipped succesfully. If the job fails then the .xml file stays intact and is deleted after a successful retry.

The idea is to constantly check the modification date of the OracleLogBackup folder and look into the folder if the modification date parameter has changed. The absence of xmls indicates that log backup has finished successfully, while the presence of xml file(s) means that either the job has failed or is in progress.

I understand that the apporach seems tricky but other methods involve checking against VBR SQL database tables or complicated PS scripting, none of these is much easier. Good news is that the ability to check log backup job status via PS will be added in 9.5, also we've already planned to add a corresponding alarm into the next versions of VeeamONE.

Thanks for the feedback!
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby franzr77 » Fri Oct 28, 2016 3:02 pm

Thank you for this information.

Could Veeam add the autodelete-feature to a future release of b&r. the current solution is far from perfect
franzr77
Novice
 
Posts: 5
Liked: never
Joined: Fri Oct 28, 2016 7:24 am
Full Name: Franz Rauscher

Re: Truncate Olrace Archive Logs immediately after shipping

Veeam Logoby Mike Resseler » Mon Oct 31, 2016 7:01 am

Franz,

I can't promise anything but Pavel will certainly bring this up the table for further versions. It is thanks to threads such as this one that functionality is born in Veeam :-). And the more people need it... ;-)

Thanks again

Mike
Mike Resseler
Veeam Software
 
Posts: 3171
Liked: 362 times
Joined: Fri Feb 08, 2013 3:08 pm
Location: Belgium, the land of the fries, the beer, the chocolate and the diamonds...
Full Name: Mike Resseler


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: BartP, gravasio, kjm1979 and 44 guests