Comprehensive data protection for all workloads
Post Reply
20100
Enthusiast
Posts: 72
Liked: 6 times
Joined: Feb 16, 2012 9:23 pm
Full Name: qq
Contact:

Oracle Backup on Windows

Post by 20100 »

Hi

We have successively implemented the backup of Oracle on Linux but are struggling to implement the similar scripts on Windows, due to the lack of Windows skills and Oracle on Windows.
I wonder if someone in the Forum had done it or could help us translating the equivalent of the linux/Oracle scripts to Windows/Oracle scripts. Thanks

On Linux our pre-free-script looks like this:

Code: Select all

echo Freeze: $(date) >> /var/log/snap
chkconfig dbora --level 345 off
su - oracle << BOF 2>&1
sqlplus /nolog <<EOF 2>&1
connect / as sysdba
alter system archive log current;
alter database begin backup;
EOF
BOF
and the post-thaw-script:

Code: Select all

echo Thaw: $(date) >>/var/log/snap
/sbin/chkconfig dbora --level 345 on
su - oracle << BOF 2>&1
sqlplus /nolog << EOF 2>&1
connect / as sysdba
alter database end backup;
alter system archive log current;
EOF
rman target / <<EOF1 2>&1
allocate channel for delete type disk;
delete noprompt archivelog all completed before 'SYSDATE -3';
release channel ;
exit;
EOF1
BOF
Thanks in advance
vMO
Expert
Posts: 176
Liked: 21 times
Joined: Jul 08, 2011 8:16 am
Contact:

Re: Oracle Backup on Windows

Post by vMO »

hi, which version of Oracle are you using?
there are VSS Writers avilable for Oracle on Windows (needs to be installed manualy)
but your "alter" commands schould also work on windows.
20100
Enthusiast
Posts: 72
Liked: 6 times
Joined: Feb 16, 2012 9:23 pm
Full Name: qq
Contact:

Re: Oracle Backup on Windows

Post by 20100 »

Hi

It is running 10.2.0.4

I did not realize we have to install the VSS manually. I will check this too.

Still struggling with the scripts for Windows. Do not know the correct syntax for it.
vMO
Expert
Posts: 176
Liked: 21 times
Joined: Jul 08, 2011 8:16 am
Contact:

Re: Oracle Backup on Windows

Post by vMO »

have you seen there is a new whitwepaper avilable with that topic..
http://www.veeam.com/wp-veeam-data-prot ... ments.html
20100
Enthusiast
Posts: 72
Liked: 6 times
Joined: Feb 16, 2012 9:23 pm
Full Name: qq
Contact:

Re: Oracle Backup on Windows

Post by 20100 »

Yes. Sorry I found it last week and it solved all my problems.
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Oracle Backup on Windows

Post by dellock6 » 1 person likes this post

Being the author, this is nice to read, thanks :)
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
20100
Enthusiast
Posts: 72
Liked: 6 times
Joined: Feb 16, 2012 9:23 pm
Full Name: qq
Contact:

Re: Oracle Backup on Windows

Post by 20100 »

Yes, Thanks Lucas

I have still a problem with the syntax for the rman command to delete the logs

On Linux we have:

Code: Select all

rman target / <<EOF1 2>&1
allocate channel for delete type disk;
delete noprompt archivelog all completed before 'SYSDATE -3';
release channel ;
but I tried several combinaisons of it in the windows scripts and taking note of your examples, but I am afraid both my windows and oracle skills are not up to it.

In the mean time, I have a separate batch job that deletes those archivelogs via Windows Scheduler, which keeps the disk size under control, but it does not solve the fact that Oracle does not update its internal info (I have been told!).

Sorry to bother you with this. Before Veeam we used HP Dataprotector with Oracle Agents and I did not need to do all this.

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

Re: Oracle Backup on Windows

Post by dellock6 »

Correct, RMAN is the only solution to delete the logs and update log tracking inside Oracle at the same time.
have you tried to run the commands directly inside rman interface to check what error comes out?
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: Oracle Backup on Windows

Post by dellock6 »

Sorry for previous reply, i was partially wrong, and I'd like to give a better explanation (thanks Tom for the note in mail).
Archive logs are managed by oracle and rman in two different ways, and without interfering with each other:
- oracle has a parameter into its config file "control_file_record_keep_time", default is 7 days, so archive logs simply don't grow infinitely, but are deleted after this age
- rman stores archive logs as part of its backup activities, and simply marks archive logs as "already backed up X times"
So if an archive log is already saved into rman, once it's deleted from disk it does not creates any additional issue.
If you are NOT using rman to do backups (I see in the first scripts you use alter database) so there's no need to inform rman of the status of archive logs, simply remove them from file system.

Sorry again for previous confusion.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
20100
Enthusiast
Posts: 72
Liked: 6 times
Joined: Feb 16, 2012 9:23 pm
Full Name: qq
Contact:

Re: Oracle Backup on Windows

Post by 20100 »

Thanks Luca
Now I do know that we are OK with the 'workaround'

Many thanks
rurouni
Enthusiast
Posts: 68
Liked: 6 times
Joined: Jul 24, 2013 7:21 pm
Contact:

Re: Oracle Backup on Windows

Post by rurouni »

I have a couple of questions concerning Oracle Backup on Windows Systems.

- Can we manage to Purge archivelogs by scripts when oracle is backed up with Application-aware processing(VSS)? I was thinking of executing a post-thaw script only on the application processing script tab. Or do i have to switch to a completely scripted based backup way?

- Online backups allows instances to be restored at snapshot time. Is it possible to replay Archivelogs after a crash with this backup model? If yes how can i proceed. Oracle DBAs said that in this case i had to start from an offline backup and replay all archive logs from this backup. Online backup only allows point in time restore. Is that correct?

Thanks for the answers.
foggy
Veeam Software
Posts: 21069
Liked: 2115 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: Oracle Backup on Windows

Post by foggy »

Starting v9 Veeam B&R will be able to manage Oracle logs just like it currently does for SQL.
Post Reply

Who is online

Users browsing this forum: ante_704, Semrush [Bot] and 216 guests