DD备份script
来源:互联网 发布:淘宝买家采集 编辑:程序博客网 时间:2024/04/28 06:28
ora_full.sh
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 91 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP off;
run
{
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
allocate channel t2 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
allocate channel t3 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
allocate channel t4 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
sql 'alter system archive log current';
backup full filesperset 1
format 'ora_%d_%I_%s_%p_%T' database;
release channel t1;
release channel t2;
release channel t3;
release channel t4;
}
run {
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
sql 'alter system archive log current';
backup filesperset 10
format 'arch_%d_%I_%s_%p_%T'
archivelog all not backed up 1 times skip inaccessible;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME "SYSDATE-7";
release channel t1;
}
run
{
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
backup format 'cntrl_%s_%p_%T' current controlfile;
backup spfile format 'spfile_%d_%I_%T_%t.ora';
release channel t1;
}
ora_log.sh
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 91 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP off;
run {
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
sql 'alter system archive log current';
backup filesperset 10
format 'arch_%d_%I_%s_%p_%T'
archivelog all not backed up 1 times skip inaccessible;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME "SYSDATE-7";
release channel t1;
}
run
{
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
backup format 'cntrl_%s_%p_%T' current controlfile;
backup spfile format 'spfile_%d_%I_%T_%t.ora';
release channel t1;
}
oracle_gpsdb.cfg
###############################################################################
#
# nmda_oracle.cfg
#
# All rights reserved.
#
# NetWorker Module for Databases and Applications (NMDA) 1.6
#
# This template is designed to help users configure NMDA Oracle scheduled
# backups if the NMC-based configuration wizard is not being used.
# Additional parameters may be added to the file when required.
#
# Check the NMDA administration guide for a complete list of all the supported
# parameters and rules for editing the configuration file.
#
# Make a copy of this file before attempting any modifications.
# To enable a parameter, uncomment or add it and specify its value.
#
###############################################################################
# #############################################################################
# MANDATORY PARAMETERS (scheduled backups only)
# #############################################################################
ORACLE_HOME =/opt/app/oracle/product/10.2.0/db_1
#
# ORACLE_HOME: Location of the Oracle software installation.
# #############################################################################
# OPTIONAL PARAMETERS (scheduled backups only)
# #############################################################################
ORACLE_SID =gpsdb2
ORACLE_USER =oracle
# NLS_LANG =
NSR_RMAN_ARGUMENTS ="nocatalog target / msglog '/data/bak_shell/oracle_gpsdb.log'"
# TNS_ADMIN =
# PRECMD =
# POSTCMD =
# NSR_NWPATH =
# NSR_DIRECT_ACCESS =
#
# ORACLE_SID: SID of the Oracle database being backed up.
# Required for proxy copy catalog synchronization, or
# when the parameter ORACLE_USER is set, or
# NSR_INCR_EXPIRATION or NSR_BUNDLING is enabled.
# ORACLE_USER: UNIX or Linux only. An operating system username to
# be used for Oracle operating system authentication.
# NLS_LANG: Sets the language, territory, and character set
# used by Oracle database.
# NSR_RMAN_ARGUMENTS: Provides extra RMAN parameters. Value must be
# enclosed in quotes. For example: "nocatalog".
# TNS_ADMIN: Set if the Oracle Net configuration files are not
# in the default location. Pathname of the directory
# location.
# PRECMD: Full pathname of a command script to be run before
# a scheduled backup. If the PRECMD script fails, the
# backup does not run.
# POSTCMD: Full pathname of a command script to be run after a
# scheduled backup. If the POSTCMD script fails, a
# warning message is printed but the backup succeeds.
# NSR_NWPATH: Pathname that contains the NetWorker binaries. May
# be needed for Avamar deduplication backups.
# NSR_DIRECT_ACCESS: Yes, No or Default (default). Yes enforces the
# Direct File Access(DFA) method. No does not
# attempt DFA at all. Default(recommended) tries
# DFA and falls back to traditional methods if DFA
# cannot be used.
# #############################################################################
# OPTIONAL PARAMETERS (manual backups only)
# #############################################################################
# #############################################################################
# DEBUG PARAMETERS (for troubleshooting)
# #############################################################################
# NSR_DEBUG_LEVEL =
# NSR_DIAGNOSTIC_DEST =
#
# NSR_DEBUG_LEVEL: 0-9.
# NSR_DIAGNOSTIC_DEST: /nsr/apps/logs (default). Location of the debug logs.
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 91 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP off;
run
{
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
allocate channel t2 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
allocate channel t3 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
allocate channel t4 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
sql 'alter system archive log current';
backup full filesperset 1
format 'ora_%d_%I_%s_%p_%T' database;
release channel t1;
release channel t2;
release channel t3;
release channel t4;
}
run {
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
sql 'alter system archive log current';
backup filesperset 10
format 'arch_%d_%I_%s_%p_%T'
archivelog all not backed up 1 times skip inaccessible;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME "SYSDATE-7";
release channel t1;
}
run
{
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
backup format 'cntrl_%s_%p_%T' current controlfile;
backup spfile format 'spfile_%d_%I_%T_%t.ora';
release channel t1;
}
ora_log.sh
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 91 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP off;
run {
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
sql 'alter system archive log current';
backup filesperset 10
format 'arch_%d_%I_%s_%p_%T'
archivelog all not backed up 1 times skip inaccessible;
DELETE NOPROMPT ARCHIVELOG UNTIL TIME "SYSDATE-7";
release channel t1;
}
run
{
allocate channel t1 type 'SBT_TAPE';
send channel t1 'NSR_ENV=(NSR_CLIENT=gps02,NSR_SERVER=bakserver,NSR_DATA_VOLUME_POOL=oraddboostb)';
backup format 'cntrl_%s_%p_%T' current controlfile;
backup spfile format 'spfile_%d_%I_%T_%t.ora';
release channel t1;
}
oracle_gpsdb.cfg
###############################################################################
#
# nmda_oracle.cfg
#
# All rights reserved.
#
# NetWorker Module for Databases and Applications (NMDA) 1.6
#
# This template is designed to help users configure NMDA Oracle scheduled
# backups if the NMC-based configuration wizard is not being used.
# Additional parameters may be added to the file when required.
#
# Check the NMDA administration guide for a complete list of all the supported
# parameters and rules for editing the configuration file.
#
# Make a copy of this file before attempting any modifications.
# To enable a parameter, uncomment or add it and specify its value.
#
###############################################################################
# #############################################################################
# MANDATORY PARAMETERS (scheduled backups only)
# #############################################################################
ORACLE_HOME =/opt/app/oracle/product/10.2.0/db_1
#
# ORACLE_HOME: Location of the Oracle software installation.
# #############################################################################
# OPTIONAL PARAMETERS (scheduled backups only)
# #############################################################################
ORACLE_SID =gpsdb2
ORACLE_USER =oracle
# NLS_LANG =
NSR_RMAN_ARGUMENTS ="nocatalog target / msglog '/data/bak_shell/oracle_gpsdb.log'"
# TNS_ADMIN =
# PRECMD =
# POSTCMD =
# NSR_NWPATH =
# NSR_DIRECT_ACCESS =
#
# ORACLE_SID: SID of the Oracle database being backed up.
# Required for proxy copy catalog synchronization, or
# when the parameter ORACLE_USER is set, or
# NSR_INCR_EXPIRATION or NSR_BUNDLING is enabled.
# ORACLE_USER: UNIX or Linux only. An operating system username to
# be used for Oracle operating system authentication.
# NLS_LANG: Sets the language, territory, and character set
# used by Oracle database.
# NSR_RMAN_ARGUMENTS: Provides extra RMAN parameters. Value must be
# enclosed in quotes. For example: "nocatalog".
# TNS_ADMIN: Set if the Oracle Net configuration files are not
# in the default location. Pathname of the directory
# location.
# PRECMD: Full pathname of a command script to be run before
# a scheduled backup. If the PRECMD script fails, the
# backup does not run.
# POSTCMD: Full pathname of a command script to be run after a
# scheduled backup. If the POSTCMD script fails, a
# warning message is printed but the backup succeeds.
# NSR_NWPATH: Pathname that contains the NetWorker binaries. May
# be needed for Avamar deduplication backups.
# NSR_DIRECT_ACCESS: Yes, No or Default (default). Yes enforces the
# Direct File Access(DFA) method. No does not
# attempt DFA at all. Default(recommended) tries
# DFA and falls back to traditional methods if DFA
# cannot be used.
# #############################################################################
# OPTIONAL PARAMETERS (manual backups only)
# #############################################################################
# #############################################################################
# DEBUG PARAMETERS (for troubleshooting)
# #############################################################################
# NSR_DEBUG_LEVEL =
# NSR_DIAGNOSTIC_DEST =
#
# NSR_DEBUG_LEVEL: 0-9.
# NSR_DIAGNOSTIC_DEST: /nsr/apps/logs (default). Location of the debug logs.
0 0
- DD备份script
- 脚本-create dd backup script
- dd备份和恢复
- dd 备份硬盘
- dd备份命令
- dd备份恢复系统
- rman备份script
- dd和nc远程备份
- linux dd备份恢复系统
- openwrt中使用dd备份
- 备份:tar、dd、cpio、dump
- DD命令备份Linux系统
- 第九章 dd备份工具
- dd备份裸设备v1.0---sydjd
- Linux dd——备份命令
- linux备份分区表,及dd命令
- 用dd实现linux硬盘备份
- 使用dd来备份还原mbr,分区表
- httpclient和jsoup
- oracle11gR2 impdp工具导入不同schema说明
- file io流(二)
- 基础数论
- 在 Virtual Box 中安装完 CentOS 后,如何调整屏幕尺寸(分辨率)
- DD备份script
- Permutations(improve)
- 2014-4-11 NPC战斗那点破事
- Linux windows文件 路径
- 物联网应用多样化,民用化趋势日渐明显
- C#获取桌面某个窗体截图进行OCR识别
- Web提速:避免php session拖慢运行速度
- Centralized Cache Management in HDFS
- 高性能网络编程6--reactor反应堆与定时器管理