First, the principle
-
- Cold backup
The process of completing all physical system file copies in a closed state, also known as offline backup
Suitable for non-archive mode, the database is in a consistent state
Steps
Start by getting all the physical file locations of the database running in the running library, and then shutting down the database (shutdown) within the plan
Perform a copy of the physical home to the backup path or backup device
Start the database immediately after the backup is complete to provide normal service
Summary-Benefits
The concept is easy to understand in cold standby mode, and the files that will need to be backed up are copied to a secure location
Simple operation, no need for too much intervention
Easy to recover to a point in time (just copy the file back)
Can be combined with the archiving method to restore the database "up-to-date state".
Summary-Disadvantages
Database must be in a consistent shutdown state when backing up
can only provide recovery to a point in time
Backup time is slow, especially the large performance impact of data volume is relatively large
Cannot implement table-and user-level data recovery
Second, the case
In the first place, you should find out the database data files, log files, control files and the location of the temporary files in the relevant view. Note: Do not direct the oradata under the CP on the line, because the production library files are usually distributed in different disks, different places, so in the view to get the real path.
1. See if the database is CDB
[Email protected]>select name, decode (CDB, ' YES ', ' multitenant Option enabled ', ' Regular 12c Database: ') "multitenant Option ", Open_mode, con_id from V$database;
NAME multitenant Option Open_mode con_id
Newtest multitenant Option enabled READ WRITE
Yes indicates that the database is CDB, if no means no-cdb (normal database) 0
- To view information about instances and databases
[Email protected]>select instance_name,version,status,archiver,database_status from v$instance;
instance_name VERSION STATUS ARCHIVE database_status
Newtest 12.2.0.1.0 OPEN STARTED ACTIVE
[Email protected]>select dbid,name,log_mode from V$database;
DBID NAME LOG_MODE
1779551310 newtest ARCHIVELOG
Oracle Cold Backup Script