Oracle automatic backup is often required. The following describes three methods of Oracle automatic backup for your reference. If you are interested in Oracle backup, take a look.
Oracle automatic database backup is similar to the following three methods:
Job plan in WINDOWS (At command)
Crontab in UNIX
Third-party tools such as Viritas
Among the three methods above, Viritas is a third-party tool, which many people may not have access to. It mainly talks about the windows Task Plan and the unix cron
1. Generate a script file. For example, backup. rcv assumes that the file content is as follows:
- $>cat backup.rcv
- connect target sys/password rcvcat rman/rman@localname;
- run{
- allocate channel c1 type disk;
- allocate channel c2 type disk;
- allocate channel c3 type disk;
- backup fileaperset 3 format ‘/u01/oradata/backup/arch%u_%s_%p’
- archivelog all delete input;
- release channel c1;
- release channel c2;
- release channel c3;
- }
2. Generate the execution file and generate backup_archive.bat on windows. The content includes rman Upload File = backup. rcv and generate backup_archive.sh under unix. The content includes oracle/ramn/rman Upload File = backup. rcv.
3. Add the task scheduling wizard in windows or use the at command. In unix, write a file on the target machine to start the automatic Oracle backup process. Assuming the file name is ORACLE, the file will be placed in the/var/spool/cron/crontabs directory
$> Cat oracle
0 23 ** 0 backup_archive.sh
# Indicates database backup at on Sunday
0 12, 18 *** backup_archive.sh
# Indicates backup at and every day
Each row of the Crontab file is composed of six fields (minutes, hours, day of month, month, day of week, command), which are separated by spaces or tabs.
Customize the correct oracle backup policy
Learn about Oracle OS backup
Importance of Oracle Database Backup
How to Implement ORACLE backup
Oracle backup command to use instances