Comprehensive data protection for all workloads
Post Reply
franzr77
Novice
Posts: 5
Liked: never
Joined: Oct 28, 2016 7:24 am
Full Name: Franz Rauscher
Contact:

Truncate Oracle Archive Logs immediately after shipping

Post by franzr77 »

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?
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by PTide »

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
franzr77
Novice
Posts: 5
Liked: never
Joined: Oct 28, 2016 7:24 am
Full Name: Franz Rauscher
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by franzr77 »

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
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by PTide »

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
franzr77
Novice
Posts: 5
Liked: never
Joined: Oct 28, 2016 7:24 am
Full Name: Franz Rauscher
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by franzr77 »

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?
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by PTide »

What OS do you use, Linux or Windows?
franzr77
Novice
Posts: 5
Liked: never
Joined: Oct 28, 2016 7:24 am
Full Name: Franz Rauscher
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by franzr77 »

Windows 2012R2
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by PTide »

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!
franzr77
Novice
Posts: 5
Liked: never
Joined: Oct 28, 2016 7:24 am
Full Name: Franz Rauscher
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by franzr77 »

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
Mike Resseler
Product Manager
Posts: 8191
Liked: 1322 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Truncate Olrace Archive Logs immediately after shipping

Post by Mike Resseler »

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
Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], Regnor, Semrush [Bot] and 69 guests