⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oraback.html

📁 oracle数据库备份脚本
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"><html><head>   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">   <meta name="Author" content="W. Curtis Preston">   <meta name="GENERATOR" content="Mozilla/4.6 [en] (WinNT; I) [Netscape]">   <title>oraback</title></head><body>&nbsp;<table COLS=1 WIDTH="100%" ><tr><td><center><b><font face="Arial,Helvetica"><font size=+2>Automating Backups:The oraback.sh Script</font></font></b></center><p><font face="Arial,Helvetica">There is a program that performs cold andhot backups of Oracle, and it is currently being used by hundreds of companiesaround the world -- oraback.sh.&nbsp; It is written in the Bourne shell,which is compatible with every Unix system.&nbsp; By using GNU's config.guessscript, the list of Unix platforms that it runs on is perhaps limitless.&nbsp;The only thing that oraback.sh assumes is that the oratab file is properlyconfigured; by default, oraback.sh automatically backs up every instancelisted there.&nbsp; Oraback.sh supports these features:</font><ul><li><font face="Arial,Helvetica">Backs up to disk or tape</font></li><li><font face="Arial,Helvetica">Automatic detection of database configuration</font></li><li><font face="Arial,Helvetica">Backs up databases on filesystems or raw partitions</font></li><li><font face="Arial,Helvetica">Multitasking, which can reduce backup timeby up to 75%&nbsp;</font></li><li><font face="Arial,Helvetica">Mail-based success and&nbsp; error notification</font></li></ul><font face="Arial,Helvetica">Oraback.sh can back up from one or more ofthe instances in oratab.&nbsp; To back up all instances, run it with noarguments:</font><p><font face="Arial,Helvetica">$ oraback.sh</font><p><font face="Arial,Helvetica">To back up one or more instances, run itwith those ORACLE_SIDs as arguments:</font><p><font face="Arial,Helvetica">$ oraback.sh ORACLE SID1 ORACLE SIDn</font><p><font face="Arial,Helvetica">To schedule a backup for the time specifiedin oraback.conf (described later in this section), run it with the at argument:</font><p><font face="Arial,Helvetica">$ oraback.sh at</font><p><font face="Arial,Helvetica">You may also combine these arguments together:</font><p><font face="Arial,Helvetica">$ oraback.sh at ORACLE SID1 ORACLE SIDn</font><p><font face="Arial,Helvetica">to specify both a backup time and the instancesto be backed up.</font><h2><font face="Arial,Helvetica">Installing oraback.sh</font></h2><font face="Arial,Helvetica">To install oraback.sh, first put oraback.sh,config.guess, and localpath.sh in one directory, then check the followingvalues in the site-specific section at the top of the script.&nbsp; Theymust be changed to fit the environment.</font><dl><dt><font face="Arial,Helvetica">BINDIR</font></dt><dd><font face="Arial,Helvetica">Should be set to where oraback.sh is installed.</font></dd><dt><font face="Arial,Helvetica">ORATAB</font></dt><dd><font face="Arial,Helvetica">Should be set to the name and location ofOracle's oratab file.</font></dd><dt><font face="Arial,Helvetica">ORACONF&nbsp;</font></dt><dd><font face="Arial,Helvetica">Should be set to the name and location ofthe oraback.conf file. (It must be located in a directory that Oracle canwrite to.)</font></dd></dl><font face="Arial,Helvetica">Review and confirm all other preference variablesin the site-specific section, including ORADIR, TMP, LOG, and PATH.&nbsp;Also verify:</font><ul><li><font face="Arial,Helvetica">Which instances are using archiving</font></li><li><font face="Arial,Helvetica">Oracle can create directories in the filesystemthat that is being used for backups (specified in the oratab file)</font></li></ul><h2><font face="Arial,Helvetica">Configuring and customizing oraback.sh</font></h2><font face="Arial,Helvetica">Oraback.conf is the main configuration filefor oraback.sh. A normal oraback.conf file contains a hostname.master linethat specifies several options such as which users are authorized to performthe backup, what backup device should be used, and on what days/times andcold/hot backup should be performed.&nbsp; If you specify oraback.sh withthe at argument, it is the hostname.master line that oraback.sh uses tofind the dates and times to run the backups. The hostname.master line isdescribed below.</font><p><font face="Arial,Helvetica">hostname.master:[skip]:Cold Day:Cold Time:HotTime:[tape device]:users:Parallelism:Backup Dir:Y::user ids:</font><p><font face="Arial,Helvetica">The above fields are described below:</font><dl><dt><font face="Arial,Helvetica">Field 1: hostname.master</font></dt><dd><font face="Arial,Helvetica">This system's hostname generated by uname-n or hostname, minus it抯 domain name.&nbsp; (e.g. apollo.domain.com becomesapollo.)</font></dd><dt><font face="Arial,Helvetica">Field 2: [skip]</font></dt><dd><font face="Arial,Helvetica">If you want all backups skipped on this hosttonight, put skip here.</font></dd><dt><font face="Arial,Helvetica">Field 3: Cold Day</font></dt><dd><font face="Arial,Helvetica">The day on which oraback.sh should do coldbackups.&nbsp; This can be a day of the week (Fri) or month (03). If thereis a blank in this field, cold backups will never be performed.</font></dd><dt><font face="Arial,Helvetica">Field 4: Cold Time</font></dt><dd><font face="Arial,Helvetica">The time of the day (using a 24-hour clock)to do cold backups.</font></dd><dt><font face="Arial,Helvetica">Field 5: Hot Time</font></dt><dd><font face="Arial,Helvetica">The time of the day (using a 24-hour clock)to do hot backups.</font></dd><dt><font face="Arial,Helvetica">Field 6: [Tape Device]</font></dt><dd><font face="Arial,Helvetica">No-rewind tape device, to back up to tape.&nbsp;(Blank for disk-only backup.)&nbsp;</font></dd><dt><font face="Arial,Helvetica">Field 7: [Users]</font></dt><dd><font face="Arial,Helvetica">A "|" separated list of user names permittedto run svrmgr and this script, such as oracle|dba (Blank allows only Oracle.)&nbsp;</font></dd><dt><font face="Arial,Helvetica">Field 8: [Parallelism]</font></dt><dd><font face="Arial,Helvetica">The number of simultaneous data file copiesto run.&nbsp; (Blank=1.)&nbsp;</font></dd><dt><font face="Arial,Helvetica">Field 9: Backup dir</font></dt><dd><font face="Arial,Helvetica">Must be set to a directory or filesystem thathas enough room for a compressed copy of all database files.&nbsp; If&nbsp;backing up to tape, this doesn't need to be that much, but it still needssome space on disk. This is because it still uses this directory to backup the control files and redo logs.</font></dd><dt><font face="Arial,Helvetica">Field 10:[Y]</font></dt><dd><font face="Arial,Helvetica">A Y means to compress the files before theyare written to tape or disk.</font></dd><dt><font face="Arial,Helvetica">Field 11: mail ids</font></dt><dd><font face="Arial,Helvetica">Set this to a comma-delimited list of mailids to mail success or failure to (e.g., dba@herworkstation.com, root)</font></dd></dl><font face="Arial,Helvetica">In addition, there are four predefined functions,unused by default, which are listed in the site-specific section of oraback.sh.&nbsp;These are listed below, with their respective usage times:</font><dl><dt><font face="Arial,Helvetica">Preback</font></dt><dd><font face="Arial,Helvetica">The Preback&nbsp; function runs before entirebackup starts.</font></dd><dt><font face="Arial,Helvetica">Preshut</font></dt><dd><font face="Arial,Helvetica">The Preshut&nbsp; function runs before shutdownof each instance.</font></dd><dt><font face="Arial,Helvetica">Poststart</font></dt><dd><font face="Arial,Helvetica">The Poststart function runs after startupof each instance.</font></dd><dt><font face="Arial,Helvetica">Postback</font></dt><dd><font face="Arial,Helvetica">The Postback&nbsp; function runs after entirebackup finishes.</font></dd>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -