In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In daily work, we often encounter the need for backup, and then restore data off-machine to provide test data.
In order to ensure the security of the data, it is recommended that you encrypt the backup.
Test environment: Oracle 12c R1 RAC environment
1. The backup script is as follows:
$cat rk_rman.sh#! / bin/sh#backup full database and archivelog#filename:/home/oracle/rk_rman.sh#oracle user execute:sh / home/oracle/rk_rman.shrman target / rm USERS.259.962188425ASMCMD [+ datadg/orcl/datafile] >
3. Restore
RMAN > startupconnected to target database (not started) Oracle instance starteddatabase mountedRMAN-00571: = = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = = RMAN-03002: failure of startupco mmand at 12 10:44:56ORA-01157: cannot identify/lock datafile 6-see DBWR trace fileORA-01110: datafile 6:'+ DATADG/ORCL/DATAFILE/users.259.962188425'RMAN > restore datafile 6 Starting restore at 08-DEC-2017 10:45:20allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=1 instance=orcl1 device type=DISKchannel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00006 to + DATADG/ORCL/DATAFILE/users.259.962188425channel ORA_DISK_1: reading from backup piece / u01/bak/db_fullbk_82_1_962188844.rmnRMAN-00571: = = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = RMAN-03002: failure of restore command at 12 failure of restore command at 08 set decryption identified by 2017 10:45:22ORA-19870: error while restoring backup piece / u01/bak/db_fullbk_82_1_962188844.rmnORA-19913: unable to decrypt backupORA-28365: wallet is not openRMAN > set decryption identified by 'roidba' Password-based encrypted backup executing command: SET decryptionRMAN > restore database Starting restore at 08-DEC-2017 10:47:47using channel ORA_DISK_1channel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00004 to + DATADG/ORCL/DATAFILE/undotbs1.260.954539485channel ORA_DISK_1: restoring datafile 00005 to + DATADG/ORCL/DATAFILE/undotbs2.265.954539975channel ORA_DISK_1: reading from backup piece / u01/bak/db_fullbk_83_1_962188844.rmnchannel ORA_DISK_1: Piece handle=/u01/bak/db_fullbk_83_1_962188844.rmn tag=BACKUP_FULLchannel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete Elapsed time: 00:00:07channel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00003 to + DATADG/ORCL/DATAFILE/sysaux.257.954539345channel ORA_DISK_1: restoring datafile 00006 to + DATADG/ORCL/DATAFILE/users.259.962188425channel ORA_DISK_1: reading from backup piece / u01/bak/db_fullbk_82_1_962188844.rmnchannel ORA_DISK_1: piece handle=/u01/bak/db_fullbk_ 82_1_962188844.rmn tag=BACKUP_FULLchannel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete Elapsed time: 00:00:45channel ORA_DISK_1: starting datafile backup set restorechannel ORA_DISK_1: specifying datafile (s) to restore from backup setchannel ORA_DISK_1: restoring datafile 00001 to + DATADG/ORCL/DATAFILE/system.258.954539407channel ORA_DISK_1: reading from backup piece / u01/bak/db_fullbk_81_1_962188844.rmnchannel ORA_DISK_1: piece handle=/u01/bak/db_fullbk_81_1_962188844.rmn tag=BACKUP_FULLchannel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete Elapsed time: 00:01:55Finished restore at 08-DEC-2017 10:50:35RMAN > recover database Starting recover at 08-DEC-2017 10:50:51using channel ORA_DISK_1starting media recoverymedia recovery complete, elapsed time: 00:00:02Finished recover at 08-DEC-2017 10:50:53RMAN > alter database open;Statement processed
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.