4. NBU文件备份与恢复,字符界面&图形界面操作

 

一、 字符界面文件备份与恢复

1.1 备份

# bpbackup -i -p file_gd_BEIFEN_full

 

1.2 检查备份数据

(1)在客户端上创建恢复目录

 [root@gd_BEIFEN /]# mkdir /restore0716

 

(2)检查备份数据

  nbu-d:/usr #   bplist -C  gd_BEIFEN -s 01/01/2017 -e 06/01/2019 -R -b -l /oraback/data/archive_data/"access4_tr_log_2019-01*" 

 

(3)在主服务器上创建目录更改文件

nbu-d:/usr # cat /restore0716/rename1   

change /oraback/data/archive_data/ to  /restore0716

 

(4)在主服务器上执行恢复操作

nbu-d:/usr # bprestore -C gd_BEIFEN -D gd_BEIFEN   -s 01/01/2017 -e 01/01/2019  -R /restore0716/rename1  -L /restore0716/restore0716.log  /oraback/data/archive_data/"access4_tr_log_2019-01*"

 

ps: /oraback/data/archive_data/"access4_tr_log_2019-01*"   该段指要恢复的文件,这样写法可以恢复大量小文件,否则用图形界面的话会很卡

 

-C client
备份客户端名称。

-D client

指定目标客户端。

-s date, -e date
指定列表的开始和结束日期范围。

-R rename_file
为备用路径还原操作指定更改后的文件名。

-L progress_log [-en]
指定要在其中写入进度信息的现有文件的名称。

-f filenames
命名一个或多个要还原的文件,可用来代替 -f 选项。
必须将指定的任何文件列在命令行结尾处,位于所有其他选项之后。必须使用绝对文件路径。

(5)在主服务器上查看恢复结果

nbu-d:/restore0716 # bpdbjobs |grep gd_BEIFEN

JobID           Type State Status                Policy                   Schedule    Client             Started    Elapsed  Kilobytes KB Per Sec

  285        Restore  Done      0                                                     gd_BEIFEN 07/16/2019 14:24:46  000:00:14     255227      26239

 

(6)在客户端上检查恢复结果

[root@gd_BEIFEN /]# cd restore0716

[root@gd_BEIFEN restore0716]# ls -lrt

总用量 8

drwxr-xr-x. 3 root root 4096  7月 16 14:20 access4_tr_log_2019-01-01

drwxr-xr-x. 3 root root 4096  7月 16 14:20 access4_tr_log_2019-01-02

 

[root@gd_BEIFEN restore0716]# du -sm *

1220      access4_tr_log_2019-01-01

1110    access4_tr_log_2019-01-02

 

二、 图形界面文件备份与恢复

2.1  文件备份

 

2.2 Windows文件恢复

(1) 打开恢复客户端

 

 

(2) 检查设置

 

 

(3) 查询可恢复信息

 

 

(4) 选取恢复时间点和文件

 

 

(5) 选择恢复目标路径执行恢复

 

 

(6) 查看恢复状态

 

 

(7) 恢复完成和验证

 

 

恢复完成

 

 

posted @ 2017-12-17 21:40  HR·  阅读(12019)  评论(0编辑  收藏  举报