Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to make online Hot backup for oracle rman

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

The purpose of this article is to share with you about how oracle rman makes hot backups online. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Here are some of my suggestions for backup, considering the following aspects as an dba,rman backup strategy:

1. The importance of archived logs, such as whether it is often necessary to retrieve archived logs with a long history.

2. Considering the total backup space, if there is enough space at that time, keep multiple backups as much as possible. If the library is small, but there are many archives generated, the archiving in a few days may exceed the size of your real database. It is recommended to shorten the cross-period of full backup.

3. Try to keep more than two full backups, and it is best to delete the historical backup after you have prepared it.

The following is the content of the script, which is archive log backup and database file complete script. If a problem occurs, you can restore the full script and use the archive log to restore to the current.

Archive log backup script

# # / opt/script/back_arch.sh

# # for normal archive log backup

. / home/oracle/.bash_profile

Dt= `date +% Y% m% d`

Logdir=/opt/script/log

If [- d ${logdir}]

Then

Sleep 1

Else

Mkdir-p $logdir

Fi

Logfile=$ {logdir} / backup_$ {dt} .trc

Echo "- `date'+% Y-%m-%d% HVR% M``-Start Backup-" > > $logfile

Rman target / log=$logfile $logfile

Find ${logdir} / * .trc-ctime + 20 | xargs rm-f

Script for full backup of database files

# # / opt/script/back_db.sh

# # for full log backup every week

#! / bin/bash

. / home/oracle/.bash_profile

Dt= `date +% Y% m% d`

Logdir=/opt/script/log

If [- d ${logdir}]

Then

Sleep 1

Else

Mkdir-p ${logdir}

Fi

Logfile=$ {logdir} / backup_$ {dt} .trc

Echo "- `date'+% Y-%m-%d% HVR% M``-Start Backup-" > > $logfile

Rman target / log=$logfile $logfile

Find ${logdir} / * .trc-ctime + 20 | xargs rm-fr

Thank you for reading! This is the end of the article on "how to make a hot backup of oracle rman online". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report