冷备-物理备份恢复-离线冷备

2019.11.20 BoobooWei

备份数据库物理文件

一般步骤

一停二拷三启动

由于备份时需要停库,所以数据库服务不可用,属于离线冷备份:offline backup

有哪些待备份的数据库物理文件?

  • 口令文件$ORACLE_HOME/dbs/orapw$ORACLE_SID
  • 参数文件$ORACLE_HOME/dbs/init$ORACLE_SID.ora$ORACLE_HOME/dbs/spfile$ORACLE_SID.ora
  • 控制文件select name from v$controlfile
  • 数据文件select name from v$datafile;
  • 日志文件select member from v$logfile;

离线冷备-物理文件的一般步骤

1 创建备份目录

mkdir /home/oracle/coldbk

2 准备停库脚本

vi /home/oracle/coldbk/shut.txt
-------------------------------
conn / as sysdba
shutdown immediate
exit
-------------------------------

3 准备启动脚本

vi /home/oracle/coldbk/start.txt
-------------------------------
conn / as sysdba
startup
exit
-------------------------------

4 通过执行SQL语句拼接拷贝文件的命令

select 'cp -v '||name||' /home/oracle/coldbk/'
from
(select name from v$controlfile
union all
select name from v$datafile
union all
select member from v$logfile);

5 准备备份脚本

vi /home/oracle/coldbk/bk.sh
-----------------------------------------------------------------------
sqlplus /nolog @/home/oracle/coldbk/shut.txt
cp -v $ORACLE_HOME/dbs/orapw$ORACLE_SID /home/oracle/coldbk/
cp -v $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora /home/oracle/coldbk/
cp -v $ORACLE_HOME/dbs/init$ORACLE_SID.ora /home/oracle/coldbk/
cp -v /home/oracle/coldbk/control01.ctl /home/oracle/coldbk/
cp -v /home/oracle/coldbk/control02.ctl /home/oracle/coldbk/
cp -v /home/oracle/coldbk/system01.dbf /home/oracle/coldbk/
cp -v /home/oracle/coldbk/sysaux01.dbf /home/oracle/coldbk/
cp -v /home/oracle/coldbk/undotbs01.dbf /home/oracle/coldbk/
cp -v /home/oracle/coldbk/users01.dbf /home/oracle/coldbk/
cp -v /home/oracle/coldbk/example01.dbf /home/oracle/coldbk/
cp -v /home/oracle/coldbk/tbs010.dbf /home/oracle/coldbk/
cp -v /home/oracle/coldbk/redo03.log /home/oracle/coldbk/
cp -v /home/oracle/coldbk/redo02.log /home/oracle/coldbk/
cp -v /home/oracle/coldbk/redo01.log /home/oracle/coldbk/
sqlplus /nolog @/home/oracle/coldbk/start.txt
-----------------------------------------------------------------------

6 修改脚本权限

chmod +x /home/oracle/coldbk/bk.sh

7 运行备份脚本

bash /home/oracle/coldbk/bk.sh

通过离线冷备的物理文件进行恢复的一般步骤

  1. 停库
  2. 清数据
  3. 导入备份文件
  4. 启动数据库
  5. 检查

1 根据之前的备份脚本,自动生成恢复脚本rt.sh

sed -n '1p' bk.sh > rt.sh
grep -v 'sqlplus' bk.sh | awk '{split($3,i,"/");print $1,$2,$4i[length(i)],$3}' >> rt.sh
sed -n '$p' bk.sh >> rt.sh
chmod a+x rt.sh

2. 执行恢复脚本

bash rt.sh

操作实践

实践01-创建一个离线冷备-物理备份

[oracle@oratest ~]$ mkdir /home/oracle/coldbk
[oracle@oratest ~]$ cd coldbk/
[oracle@oratest coldbk]$ ll
total 0
[oracle@oratest coldbk]$ cat > shut.txt << ENDF
> conn / as sysdba
> shutdown immediate
> exit
> ENDF
[oracle@oratest coldbk]$ ll
total 4
-rw-r--r-- 1 oracle oinstall 41 Nov 23 19:17 shut.txt
[oracle@oratest coldbk]$ cat > start.txt << ENDF
> conn / as sysdba
> startup
> exit
> ENDF
[oracle@oratest coldbk]$ ll
total 8
-rw-r--r-- 1 oracle oinstall 41 Nov 23 19:17 shut.txt
-rw-r--r-- 1 oracle oinstall 30 Nov 23 19:18 start.txt

[oracle@oratest ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 19:11:11 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select 'cp -v '||name||' /home/oracle/coldbk/'
2 from (
3 select name from v$controlfile
4 union all
5 select name from v$datafile
6 union all
7 select member from v$logfile
8 );

'CP-V'||NAME||'/HOME/ORACLE/COLDBK/'
--------------------------------------------------------------------------------
cp -v /u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/system01.dbf /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/sysaux01.dbf /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/undotbs01.dbf /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/users01.dbf /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/redo01a.log /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/redo01b.log /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/redo02a.log /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/redo02b.log /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/redo03a.log /home/oracle/coldbk/
cp -v /u01/app/oracle/oradata/BOOBOO/redo03b.log /home/oracle/coldbk/

11 rows selected.


[oracle@oratest coldbk]$ cat > bk.sh << ENDF
> sqlplus /nolog @/home/oracle/coldbk/shut.txt
> cp -v $ORACLE_HOME/dbs/orapw$ORACLE_SID /home/oracle/coldbk/
> cp -v $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora /home/oracle/coldbk/
> cp -v $ORACLE_HOME/dbs/init$ORACLE_SID.ora /home/oracle/coldbk/
> cp -v /u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/system01.dbf /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/sysaux01.dbf /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/undotbs01.dbf /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/users01.dbf /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/redo01a.log /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/redo01b.log /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/redo02a.log /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/redo02b.log /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/redo03a.log /home/oracle/coldbk/
> cp -v /u01/app/oracle/oradata/BOOBOO/redo03b.log /home/oracle/coldbk/
> sqlplus /nolog @/home/oracle/coldbk/start.txt
> ENDF
[oracle@oratest coldbk]$ ll
total 12
-rw-r--r-- 1 oracle oinstall 1065 Nov 23 19:22 bk.sh
-rw-r--r-- 1 oracle oinstall 41 Nov 23 19:17 shut.txt
-rw-r--r-- 1 oracle oinstall 30 Nov 23 19:18 start.txt
[oracle@oratest coldbk]$ chmod +x /home/oracle/coldbk/bk.sh
[oracle@oratest coldbk]$ bash bk.sh

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 19:22:53 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
`/u01/app/oracle/product/11.2.0.4/dbs/orapwBOOBOO' -> `/home/oracle/coldbk/orapwBOOBOO'
`/u01/app/oracle/product/11.2.0.4/dbs/spfileBOOBOO.ora' -> `/home/oracle/coldbk/spfileBOOBOO.ora'
`/u01/app/oracle/product/11.2.0.4/dbs/initBOOBOO.ora' -> `/home/oracle/coldbk/initBOOBOO.ora'
`/u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf' -> `/home/oracle/coldbk/cntrlBOOBOO.dbf'
`/u01/app/oracle/oradata/BOOBOO/system01.dbf' -> `/home/oracle/coldbk/system01.dbf'
`/u01/app/oracle/oradata/BOOBOO/sysaux01.dbf' -> `/home/oracle/coldbk/sysaux01.dbf'
`/u01/app/oracle/oradata/BOOBOO/undotbs01.dbf' -> `/home/oracle/coldbk/undotbs01.dbf'
`/u01/app/oracle/oradata/BOOBOO/users01.dbf' -> `/home/oracle/coldbk/users01.dbf'
`/u01/app/oracle/oradata/BOOBOO/redo01a.log' -> `/home/oracle/coldbk/redo01a.log'
`/u01/app/oracle/oradata/BOOBOO/redo01b.log' -> `/home/oracle/coldbk/redo01b.log'
`/u01/app/oracle/oradata/BOOBOO/redo02a.log' -> `/home/oracle/coldbk/redo02a.log'
`/u01/app/oracle/oradata/BOOBOO/redo02b.log' -> `/home/oracle/coldbk/redo02b.log'
`/u01/app/oracle/oradata/BOOBOO/redo03a.log' -> `/home/oracle/coldbk/redo03a.log'
`/u01/app/oracle/oradata/BOOBOO/redo03b.log' -> `/home/oracle/coldbk/redo03b.log'

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 19:24:41 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.
ORACLE instance started.

Total System Global Area 229683200 bytes
Fixed Size 2251936 bytes
Variable Size 171967328 bytes
Database Buffers 50331648 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

实践02-模拟故障后进行恢复

awk命令测试

[oracle@oratest coldbk]$ grep -v 'sqlplus' bk.sh | awk '{split($3,i,"/");print $1,$2,$4i[length(i)],$3}'
cp -v /home/oracle/coldbk/orapwBOOBOO /u01/app/oracle/product/11.2.0.4/dbs/orapwBOOBOO
cp -v /home/oracle/coldbk/spfileBOOBOO.ora /u01/app/oracle/product/11.2.0.4/dbs/spfileBOOBOO.ora
cp -v /home/oracle/coldbk/initBOOBOO.ora /u01/app/oracle/product/11.2.0.4/dbs/initBOOBOO.ora
cp -v /home/oracle/coldbk/cntrlBOOBOO.dbf /u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf
cp -v /home/oracle/coldbk/system01.dbf /u01/app/oracle/oradata/BOOBOO/system01.dbf
cp -v /home/oracle/coldbk/sysaux01.dbf /u01/app/oracle/oradata/BOOBOO/sysaux01.dbf
cp -v /home/oracle/coldbk/undotbs01.dbf /u01/app/oracle/oradata/BOOBOO/undotbs01.dbf
cp -v /home/oracle/coldbk/users01.dbf /u01/app/oracle/oradata/BOOBOO/users01.dbf
cp -v /home/oracle/coldbk/redo01a.log /u01/app/oracle/oradata/BOOBOO/redo01a.log
cp -v /home/oracle/coldbk/redo01b.log /u01/app/oracle/oradata/BOOBOO/redo01b.log
cp -v /home/oracle/coldbk/redo02a.log /u01/app/oracle/oradata/BOOBOO/redo02a.log
cp -v /home/oracle/coldbk/redo02b.log /u01/app/oracle/oradata/BOOBOO/redo02b.log
cp -v /home/oracle/coldbk/redo03a.log /u01/app/oracle/oradata/BOOBOO/redo03a.log
cp -v /home/oracle/coldbk/redo03b.log /u01/app/oracle/oradata/BOOBOO/redo03b.log

恢复过程

[oracle@oratest coldbk]$ sed -n '1p' bk.sh > rt.sh
[oracle@oratest coldbk]$ grep -v 'sqlplus' bk.sh | awk '{split($3,i,"/");print $1,$2,$4i[length(i)],$3}' >> rt.sh
[oracle@oratest coldbk]$ sed -n '$p' bk.sh >> rt.sh
[oracle@oratest coldbk]$ chmod a+x rt.sh
[oracle@oratest coldbk]$ ll
total 2006184
-rwxr-xr-x 1 oracle oinstall 1111 Nov 23 19:28 bk.sh
-rw-r----- 1 oracle oinstall 9519104 Nov 23 19:23 cntrlBOOBOO.dbf
-rw-r--r-- 1 oracle oinstall 39 Nov 23 19:23 initBOOBOO.ora
-rw-r----- 1 oracle oinstall 1536 Nov 23 19:23 orapwBOOBOO
-rw-r----- 1 oracle oinstall 104858112 Nov 23 19:24 redo01a.log
-rw-r----- 1 oracle oinstall 104858112 Nov 23 19:24 redo01b.log
-rw-r----- 1 oracle oinstall 104858112 Nov 23 19:24 redo02a.log
-rw-r----- 1 oracle oinstall 104858112 Nov 23 19:24 redo02b.log
-rw-r----- 1 oracle oinstall 104858112 Nov 23 19:24 redo03a.log
-rw-r----- 1 oracle oinstall 104858112 Nov 23 19:24 redo03b.log
-rwxr-xr-x 1 oracle oinstall 1281 Nov 23 19:55 rt.sh
-rw-r--r-- 1 oracle oinstall 41 Nov 23 19:17 shut.txt
-rw-r----- 1 oracle oinstall 1536 Nov 23 19:23 spfileBOOBOO.ora
-rw-r--r-- 1 oracle oinstall 30 Nov 23 19:18 start.txt
-rw-r----- 1 oracle oinstall 340795392 Nov 23 19:23 sysaux01.dbf
-rw-r----- 1 oracle oinstall 340795392 Nov 23 19:23 system01.dbf
-rw-r----- 1 oracle oinstall 209723392 Nov 23 19:23 undotbs01.dbf
-rw-r----- 1 oracle oinstall 524296192 Nov 23 19:24 users01.dbf
[oracle@oratest coldbk]$ cat rt.sh
sqlplus /nolog @/home/oracle/coldbk/shut.txt
cp -v /home/oracle/coldbk/orapwBOOBOO /u01/app/oracle/product/11.2.0.4/dbs/orapwBOOBOO
cp -v /home/oracle/coldbk/spfileBOOBOO.ora /u01/app/oracle/product/11.2.0.4/dbs/spfileBOOBOO.ora
cp -v /home/oracle/coldbk/initBOOBOO.ora /u01/app/oracle/product/11.2.0.4/dbs/initBOOBOO.ora
cp -v /home/oracle/coldbk/cntrlBOOBOO.dbf /u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf
cp -v /home/oracle/coldbk/system01.dbf /u01/app/oracle/oradata/BOOBOO/system01.dbf
cp -v /home/oracle/coldbk/sysaux01.dbf /u01/app/oracle/oradata/BOOBOO/sysaux01.dbf
cp -v /home/oracle/coldbk/undotbs01.dbf /u01/app/oracle/oradata/BOOBOO/undotbs01.dbf
cp -v /home/oracle/coldbk/users01.dbf /u01/app/oracle/oradata/BOOBOO/users01.dbf
cp -v /home/oracle/coldbk/redo01a.log /u01/app/oracle/oradata/BOOBOO/redo01a.log
cp -v /home/oracle/coldbk/redo01b.log /u01/app/oracle/oradata/BOOBOO/redo01b.log
cp -v /home/oracle/coldbk/redo02a.log /u01/app/oracle/oradata/BOOBOO/redo02a.log
cp -v /home/oracle/coldbk/redo02b.log /u01/app/oracle/oradata/BOOBOO/redo02b.log
cp -v /home/oracle/coldbk/redo03a.log /u01/app/oracle/oradata/BOOBOO/redo03a.log
cp -v /home/oracle/coldbk/redo03b.log /u01/app/oracle/oradata/BOOBOO/redo03b.log
sqlplus /nolog @/home/oracle/coldbk/start.txt
[oracle@oratest coldbk]$ bash rt.sh

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 19:59:53 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
`/home/oracle/coldbk/orapwBOOBOO' -> `/u01/app/oracle/product/11.2.0.4/dbs/orapwBOOBOO'
`/home/oracle/coldbk/spfileBOOBOO.ora' -> `/u01/app/oracle/product/11.2.0.4/dbs/spfileBOOBOO.ora'
`/home/oracle/coldbk/initBOOBOO.ora' -> `/u01/app/oracle/product/11.2.0.4/dbs/initBOOBOO.ora'
`/home/oracle/coldbk/cntrlBOOBOO.dbf' -> `/u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf'
`/home/oracle/coldbk/system01.dbf' -> `/u01/app/oracle/oradata/BOOBOO/system01.dbf'
`/home/oracle/coldbk/sysaux01.dbf' -> `/u01/app/oracle/oradata/BOOBOO/sysaux01.dbf'
`/home/oracle/coldbk/undotbs01.dbf' -> `/u01/app/oracle/oradata/BOOBOO/undotbs01.dbf'
`/home/oracle/coldbk/users01.dbf' -> `/u01/app/oracle/oradata/BOOBOO/users01.dbf'
`/home/oracle/coldbk/redo01a.log' -> `/u01/app/oracle/oradata/BOOBOO/redo01a.log'
`/home/oracle/coldbk/redo01b.log' -> `/u01/app/oracle/oradata/BOOBOO/redo01b.log'
`/home/oracle/coldbk/redo02a.log' -> `/u01/app/oracle/oradata/BOOBOO/redo02a.log'
`/home/oracle/coldbk/redo02b.log' -> `/u01/app/oracle/oradata/BOOBOO/redo02b.log'
`/home/oracle/coldbk/redo03a.log' -> `/u01/app/oracle/oradata/BOOBOO/redo03a.log'
`/home/oracle/coldbk/redo03b.log' -> `/u01/app/oracle/oradata/BOOBOO/redo03b.log'

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 20:01:19 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.
ORACLE instance started.

Total System Global Area 229683200 bytes
Fixed Size 2251936 bytes
Variable Size 171967328 bytes
Database Buffers 50331648 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

检查验证

[oracle@oratest coldbk]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 20:02:18 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ WRITE

SQL> conn scott/tiger
Connected.
SQL> select * from tab;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
T02 TABLE

SQL> select *from t02;

X Y
---------- --------------------
1 中国
2 巴西

自动化脚本

自动生成离线冷备物理文件脚本

[oracle@oratest backup_scripts]$ pwd
/home/oracle/backup_scripts
[oracle@oratest backup_scripts]$ ll
total 4
-rw-r--r-- 1 oracle oinstall 1832 Nov 23 23:08 AutoGetColdBackupScripts.sh
<<<<<<< HEAD
[oracle@oratest backup_scripts]$ bash AutoGetColdBackupScripts.sh
=======
[oracle@oratest backup_scripts]$ bash AutoGetColdBackupScripts.sh
>>>>>>> bd110fe0aeb2e625f17b5a1b0917463b970870c7
指定备份目录 [ default /home/oracle/coldbk] :
备份目录为:/home/oracle/coldbk
指定备份子目录 [默认为当前的年月日时分秒] :
备份子目录为:20191123230946
开始生成脚本,请按回车键
/home/oracle/coldbk/20191123230946目录创建 OK
离线冷备-物理文件备份脚本生成 OK
查看脚本:ll /home/oracle/coldbk/bk.sh


[oracle@oratest backup_scripts]$ cat /home/oracle/coldbk/bk.sh
sqlplus /nolog @/home/oracle/coldbk/shut.txt
cp -v /u01/app/oracle/product/11.2.0.4/dbs/orapwBOOBOO /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/product/11.2.0.4/dbs/spfileBOOBOO.ora /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/product/11.2.0.4/dbs/initBOOBOO.ora /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/system01.dbf /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/sysaux01.dbf /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/undotbs01.dbf /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/users01.dbf /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/redo01a.log /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/redo01b.log /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/redo02a.log /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/redo02b.log /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/redo03a.log /home/oracle/coldbk/20191123230946
cp -v /u01/app/oracle/oradata/BOOBOO/redo03b.log /home/oracle/coldbk/20191123230946
sqlplus /nolog @/home/oracle/coldbk/start.txt


[oracle@oratest coldbk]$ bash bk.sh

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 23:10:44 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
`/u01/app/oracle/product/11.2.0.4/dbs/orapwBOOBOO' -> `/home/oracle/coldbk/20191123230946/orapwBOOBOO'
`/u01/app/oracle/product/11.2.0.4/dbs/spfileBOOBOO.ora' -> `/home/oracle/coldbk/20191123230946/spfileBOOBOO.ora'
`/u01/app/oracle/product/11.2.0.4/dbs/initBOOBOO.ora' -> `/home/oracle/coldbk/20191123230946/initBOOBOO.ora'
`/u01/app/oracle/product/11.2.0.4/dbs/cntrlBOOBOO.dbf' -> `/home/oracle/coldbk/20191123230946/cntrlBOOBOO.dbf'
`/u01/app/oracle/oradata/BOOBOO/system01.dbf' -> `/home/oracle/coldbk/20191123230946/system01.dbf'
`/u01/app/oracle/oradata/BOOBOO/sysaux01.dbf' -> `/home/oracle/coldbk/20191123230946/sysaux01.dbf'
`/u01/app/oracle/oradata/BOOBOO/undotbs01.dbf' -> `/home/oracle/coldbk/20191123230946/undotbs01.dbf'
`/u01/app/oracle/oradata/BOOBOO/users01.dbf' -> `/home/oracle/coldbk/20191123230946/users01.dbf'
`/u01/app/oracle/oradata/BOOBOO/redo01a.log' -> `/home/oracle/coldbk/20191123230946/redo01a.log'
`/u01/app/oracle/oradata/BOOBOO/redo01b.log' -> `/home/oracle/coldbk/20191123230946/redo01b.log'
`/u01/app/oracle/oradata/BOOBOO/redo02a.log' -> `/home/oracle/coldbk/20191123230946/redo02a.log'
`/u01/app/oracle/oradata/BOOBOO/redo02b.log' -> `/home/oracle/coldbk/20191123230946/redo02b.log'
`/u01/app/oracle/oradata/BOOBOO/redo03a.log' -> `/home/oracle/coldbk/20191123230946/redo03a.log'
`/u01/app/oracle/oradata/BOOBOO/redo03b.log' -> `/home/oracle/coldbk/20191123230946/redo03b.log'

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 23 23:12:02 2019

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.
ORACLE instance started.

Total System Global Area 229683200 bytes
Fixed Size 2251936 bytes
Variable Size 171967328 bytes
Database Buffers 50331648 bytes
Redo Buffers 5132288 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options