Tags:
create new tag
view all tags
Amanda recover

注意:建议使用tmp等临时目录恢复文件,否则如果同一个目录下的文件重名,可能会覆盖文件

文件的恢复必须在客户端上,用root用户

一个文件恢复的例子:

[root@lxbak1 /]# cd /tmp

[root@lxbak1 /]# amrecover Dailyset(对应客户端的备份参数Dailyset)

AMRECOVER Version 2.5.2. Contacting server on amanda.ihep.ac.cn ...

220 amanda AMANDA index server (2.5.2) ready.

Setting restore date to today (2009-02-04)

200 Working date set to 2009-02-04.

200 Config set to Dailyset.

200 Dump host set to lxbak1.ihep.ac.cn.

Use the setdisk command to choose dump disk to recover

(如果备份申请的是ip地址,请多执行下一步:

amrecover> sethost ip地址 )

amrecover> listdisk

200- List of disk for host lxbak1.ihep.ac.cn

201- /var/www/html

200 List of disk for host lxbak1.ihep.ac.cn

amrecover> setdisk /var/www/html

200 Disk set to /var/www/html.

amrecover> ls

2007-01-05-13-04-03 tar-1.15/

2007-01-05-13-04-03 .

amrecover> cd tar-1.15

/var/www/html/tar-1.15

amrecover> ls

2007-01-05-13-04-03 scripts/

2007-01-05-13-04-03 doc/

2007-01-05-13-04-03 configure

2007-01-05-13-04-03 config/

2007-01-05-13-04-03 COPYING

2007-01-05-13-04-03 AUTHORS

2007-01-05-13-04-03 ABOUT-NLS

amrecover> add scripts/

Added dir /tar-1.15/scripts/ at date 2007-01-05-13-04-03

amrecover> add configure

Added file /tar-1.15/configure

amrecover> add doc/

Added dir /tar-1.15/doc/ at date 2007-01-05-13-04-03

amrecover> lcd /tmp

amrecover> extract

Extracting files using tape drive chg-disk on host amanda.ihep.ac.cn.

The following tapes are needed: DailySet-02

Restoring files into directory /tmp

Continue [?/Y/n]? y

Extracting files using tape drive chg-disk on host amanda.ihep.ac.cn.

Load tape DailySet-02 now

Continue [?/Y/n/s/t]? y

./tar-1.15/doc/

./tar-1.15/scripts/

./tar-1.15/configure

./tar-1.15/doc/Makefile.am

./tar-1.15/doc/Makefile.in

./tar-1.15/doc/convtexi.pl

./tar-1.15/doc/fdl.texi

./tar-1.15/doc/freemanuals.texi

./tar-1.15/doc/getdate.texi

./tar-1.15/doc/header.texi

./tar-1.15/doc/stamp-vti

./tar-1.15/doc/tar.info

./tar-1.15/doc/tar.info-1

./tar-1.15/doc/tar.info-2

./tar-1.15/doc/tar.texi

./tar-1.15/doc/version.texi

./tar-1.15/scripts/Makefile.am

./tar-1.15/scripts/Makefile.in

./tar-1.15/scripts/backup-specs

./tar-1.15/scripts/backup.in

./tar-1.15/scripts/backup.sh.in

./tar-1.15/scripts/dump-remind.in

./tar-1.15/scripts/restore.in

amrecover> quit

200 Good bye

amrecover可选命令:

amrecover>listdisk 列出客户端上备份的所有目录

amrecover>setdisk 指定需要恢复的目录

amrecover>setdate YYYY-MM-DD 设定需要恢复的日期,默认为最新备份的日期。

格式:amrecover>setdate YYYY-MM-DD 如:2007-06-12

amrecover>setdate --MM-DD 如:--06-12

amrecover>setdate ---DD 如:---12

amrecover>add item1 item2 … 加入需要恢复的文件或目录

amrecover>addx item1 item2 … 加入需要恢复的文件或目录(支持通配符)

amrecover>lpwd 查看amrecover当前工作目录,所有恢复文件将会拷贝到当前目录下

amrecover>lcd path 修改当前工作目录,指定到path

amrecover>extract 开始恢复文件

如果出现以下错误:

amrecover> setdisk /ihepbatch/cc 200 Disk set to /ihepbatch/cc. No index records for disk for specified date If date correct, notify system administrator 请立即联络管理员

管理员:姚秋玲 tel:88236007 mail: yaoql@ihep.ac.cn

郑伟 tel:88236883 mail:zhengw@ihep.ac.cn

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2012-09-27 - YaoQiuling
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback