Backup3G/DA-Oracle/Command Reference
From Documentation
< Backup3GRevision as of 08:07, 3 September 2007; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
Contents |
ORAofflne
NAME
- ORAofflne — Offline Oracle backup
SYNOPSIS
ORAofflne [-v] [-n] [-p <params_pattern>] [-s <file_patterns>] [-D] [-U] [-u <logname>] <host> <sid>
DESCRIPTION
- ORAofflne implements full backup of Oracle control files, redo logs and tablespaces with the database shut down. Control files and redo logs are backed up using cpio format. Each data file in a tablespace is backed up as a multi-part image.
- Before starting a backup ORAofflne shuts down the database if it is up, restarts it in restricted mode, determines the files to back up, and then shuts the database down. ORAofflne also backs up the contents of one of the directories $ORACLE_BASE/admin/$SID, $ORACLE_HOME/dbs, or $ORACLE_HOME/admin, which should contain parameter and configuration files.
- If none of these directories exist the backup will give a warning and return an error status 1 on completion.
- When all files are backed up ORAofflne sends a request to bring the database up, unless the -D flag is specified or the database was already down before the backup started.
OPTIONS
- -v
- Verbose mode. List the files to be backed up in the backup log.
- -n
- Do not follow symbolic links. The default is to follow symbolic links and backup the target file rather than the symbolic link.
- -p <params_pattern>
- Specifies the directory and file pattern for the Oracle configuration files of this SID which should be backed up along with Oracle backup. Note that the –p flag can only be specified once. If -p is not supplied, one of the directories $ORACLE_BASE/admin/$SID, $ORACLE_HOME/dbs, or $ORACLE_HOME/admin is backed up.
- -s <file_patterns>
- Specifies additional files which should be backed up along with Oracle backup. Note that file-patterns can be a spaceseparated list of patterns, and that the –s flag can be specified multiple times.
- -D
- Do not restart the database after backup.
- -U
- Restart the database after backup.
- -u <logname>
- The Oracle user login name. If -u is not supplied, the login name will be picked up from the environment variable ORA_LOGNAME or will default to oracle7.
- <host>
- The host where the database resides.
- <sid>
- The Oracle SID of the database to backup.
SEE ALSO
COPYRIGHT
- Copyright © 1990-2006 Functional Software. All rights reserved.
ORAonline
NAME
- ORAonline — Online Oracle backup
SYNOPSIS
ORAonline [-v] [-n] [-r|-R] [-p <params_pattern>] [-s <file_pattern>] [-t <tablespaces>|-x <tablespaces>] [-u <logname>] <host> <sid>
DESCRIPTION
- ORAonline implements full or partial backup of Oracle tablespaces while the database is running.
- Initially ORAonline sends a request to Oracle to check whether the database is running and whether it is in ARCHIVELOG mode. If one of these conditions is not true Oracle online backup does not run.
- ORAonline first obtains the oldest archived sequence log number (SLN). Then it obtains the list of tablespaces in the database and the files which are to be backed up, and backs up one tablespace at a time by putting the tablespace in backup mode, backing up all files of this tablespace and releasing the tablespace back to normal mode.
- When all tablespaces are backed up, ORAonline sends a request to the database to perform a log switch and obtains the next SLN to archive, and all relevant archive logs are backed up. Then ORAonline sends a request to the Oracle server to back up the control files by running the ‘alter database backup controlfile …’ command, and they are then backed up. ORAonline will then attempt to save the parameter and configuration files from ORACLE_HOME/admin/$SID. If this directory does not exist the job will give a warning and return an error status 1 on completion. Finally any additional files (see the -s flag) are backed up.
- Each tablespace data file is backed up as multi-part image backup (FSmimage). Each archive log and control file is backed up as a single part cpio backup (FScpio(1)).
OPTIONS
- -v
- Verbose mode. List the tablespaces, their current status and the files to be backed up in the backup log.
- -n
- Do not follow symbolic links. The default is to follow symbolic links and backup the target file rather than the symbolic link.
- -r
- Backup read only tablespaces. This is the default.
- -R
- Do not backup, that is, skip read only tablespaces.
- -p <params_pattern>
- Specifies the directory and file pattern for the Oracle configuration files of this SID which should be backed up along with Oracle backup. Note that the –p flag can only be specified once. If -p is not supplied, one of the directories $ORACLE_BASE/admin/$SID, $ORACLE_HOME/dbs, or $ORACLE_HOME/admin is backed up.
- -s <file-pattern>
- Specifies additional files which should be backed up together with Oracle backup.
- -t <tablespace-list>
- A space-separated list of tablespace names which are to be backed up. If the option is omitted all tablespaces are backed up.
- -x <tablespace-list>
- A space-separated list of tablespace names which should not be backed up. The -t and -x options must not be supplied together.
- -u <logname>
- The Oracle user login name. If -u is not supplied, the login name will be picked up from the environment variable ORA_LOGNAME or will default to oracle7.
- <host>
- The Oracle host.
- <sid>
- The Oracle SID.
EXAMPLES
ORAonline wombat ORCL
- Performs an online backup of all tablespaces of the ORCL database on host wombat.
ORAonline -t "SYSTEM TEMP" wombat ORCL
- Performs an online backup of tablespaces SYSTEM and TEMP.
ORAonline -x "SYSTEM TEMP" wombat ORCL
- Performs an online backup of all tablespaces except SYSTEM and TEMP.
FILES
- orafiles
- The temporary backup table with a list of data files and corresponding tablespaces, archive logs and control files.
SEE ALSO
COPYRIGHT
- Copyright © 1990-2006 Functional Software. All rights reserved.
ORAarch
NAME
- ORAarch — Backup Oracle archive logs
SYNOPSIS
ORAarch [-v] [-n] [-k <num_logs_to_keep>] [-u <logname>] <host> <sid>
DESCRIPTION
- ORAarch implements a full backup of Oracle archived log files. ORAarch backs up all logs in the Oracle archive destination directory using multi-part cpio.
OPTIONS
- -v
- Verbose mode. List the files to be backed up in the backup log.
- -n
- Do not follow symbolic links. The default is to follow symbolic links and backup the target file rather than the symbolic link.
- -k <num_logs_to_keep>
- Specifies the number of latest archive log files which should be left on disk. All others are removed.
- -u <logname>
- The Oracle user login name. If -u is not supplied the login name will be picked up from the environment variable ORA_LOGNAME or will default to oracle7.
- <host>
- The Oracle host.
- <sid>
- The Oracle SID.
EXAMPLES
ORAarch wombat ORCL
- The archive log files for the Oracle SID ORCL on host wombat are located in /usr/opt/oracle/arch:
- arch_233.log, arch_234.log, …, arch_256.log
- The next log sequence number to archive is 260. ORAarch will switch the archive logs, then back up all files from /usr/opt/oracle/arch
SEE ALSO
COPYRIGHT
- Copyright © 1990-2006 Functional Software. All rights reserved.
ORAexport
NAME
- ORAexport — Create oracle export file and back it up
SYNOPSIS
ORAexport -f|-i|-t <tables>|-o <owner> -l <username/password> [-p <params_file>] [-P <export_params>] [-u <ora_logname>] [-d <tmpdir>] <host> <sid>
DESCRIPTION
- ORAexport performs an Oracle export of tables in a database. You may perform a full or incremental database export, or an export of select tables or of the tables owned by specified users. All exports are first performed to a temporary file, and then this file is backed up to a removable media using the multi-part image backup method.
OPTIONS
- -f
- Perform a full (complete) Oracle export.
- -i
- Perform an incremental Oracle export. Only tables modified since the last full export are saved. Note that Oracle calls this type of export cumulative.
- -t <tables>
- Perform an Oracle export of the space-separated list of tables.
- -o <owners>
- Perform Oracle export of tables which belong to the spaceseparated list of owners.
- -l <username/password>
- Perform the export as the user username.
- -d <tmpdir>
- Use the given temporary directory to store the exported data prior to being copied to the removable medium. Default is /tmp.
- -p <params_file>
- Use the given file to specify all the export parameters.
- -P <export_params>
- Use the additional specified export parameters. The specified export parameters must be enclosed by a single set of double quotes.
- -u <logname>
- Use the specified Oracle login name. This is the UNIX login name for the Oracle user; it is NOT a user of the Oracle database. If -u is not supplied, the login name will be picked up from the environment variable ORA_LOGNAME which is set in the Oracle backup profile.
- <host>
- The host where the database resides.
- <sid>
- The Oracle SID of the database.
EXAMPLES
ORAexport -t ’finance dept’ -l scott/tiger wombat ORCL
- Create an Oracle export file of tables finance and dept of the Oracle database ORCL on host wombat. Perform the Oracle export as user scott (password tiger).
SEE ALSO
COPYRIGHT
- Copyright © 1990-2006 Functional Software. All rights reserved.
ORArestre
NAME
- ORArestre — Restore from Oracle backup
SYNOPSIS
ORArestre [Directory]
DESCRIPTION
- ORArestre restores files which have been backed up by ORAofflne or ORAonline to their original places or to a new directory. The list of files to restore is passed from runrec as an environment variable ORALIST. If ORALIST is null, all files in the chosen media set will be restored.
- Directory specifies where the files should be restored. If directory is null, the original database is restored.
WARNINGS
- If two or more data files of the same or different tablespaces have different paths but the same names, their contents could be lost if they are restored to the same directory. In this case, un-check Collapse dirs?
- Note that ORArestre performs only UNIX file restore and does not check the database status.
SEE ALSO
COPYRIGHT
- Copyright © 1990-2006 Functional Software. All rights reserved.