The following articles mainly describe how to automatically back up Oracle databases in UNIX, if you are interested in automatic Oracle database backup under UNIX, you can click the following article to view it. The following describes the specific content of the article.
Start the backup process
Cron is a permanent process started and executed by/etc/rc. local. Cron checks the files in the/var/spool/cron/crontabs/directory and finds the task to be executed and the time when the task is executed.
Each row of the Crontab file consists of six fields (minutes, hours, day of month, month, day of week, and command). The fields are separated by spaces or tabs:
Minutes: minute field. The value ranges from 0 to 59.
Hours: small time domain. The value ranges from 0 to 23.
Day of month: date. The value ranges from 1 to 31.
Month: month. The value ranges from 1 to 12.
Day of week: day of the week. The value ranges from 0 to 6. The value of Sunday is 0.
Command: the command to be run
If a domain is, the command can be executed within all possible values of the domain.
If a field is two numbers separated by a hyphen, the command can be executed within the range of two numbers (including the two numbers themselves ).
If a field is composed of a series of values separated by commas, the command can be executed within the range of these values.
If both the date and week fields have values, these two fields are valid.
Now, we write a file to start the automatic backup process. It is worth noting that this file can only be edited using the crontab-e command under the Oracle user name; otherwise, it will not be regularly executed and the file name should be set to the Oracle database, the file will be stored in the/var/spool/cron/crontabs directory. After editing, you can run the crontab-l command at the $ prompt in Oracle.
Oracle file content:
0 23/oracle/ora-backup
Perform backup at every day on the Oracle database
0 2/oracle/tar-backup
Back Up Files to tape at 2 o'clock every day
0 4 ftp-I host2
Back Up Files to another host at 4 o'clock every day
After the above operations, the system will automatically generate a backup every night, and automatically copy the backup files to the tape and the other host. What the system administrator needs to do is to change a disk every several days (the cycle of changing the tape depends on the size of the backup file and the size of the tape) and clean up the backup directory. In this way, they can free themselves from the hassle of backing up data and do other meaningful work.
The Oracle Database not only implements tape backup, but also remote backup, which greatly improves the security.
Article by: http://database.ctocio.com.cn/448/8997448_3.shtml