amanda 使用disk备份笔记

Amanda

什么是amanda

Amanda (Advanced Maryland Automatic Network Disk Archiver,马里兰高级自动网络磁盘存档工具) 是由马里兰大学的James da Silva在1991年所开发的。它是一个复杂的网络备份系统,能够把LAN中的所有计算机备份到一台服务器的磁带驱动器、磁盘或光盘上。

Amanda本身并不是备份程序,它其实只是管理其他备份软件的封装软件。它使用系统上的dump和restore命令作为底层的备份软件,同时也能够使用tar命令,针对于windows计算机,Amanda还能够使用smbtar命令来实现备份。

Amanda 支持类型广泛的磁带驱动器,并且能够使用磁带驱动器中的硬件压缩功能,或者也可以在数据通过网络之前使用客户机的compress以及gzip命令来压缩 备份。其次,Amanda能够使用临时保存磁盘作为备份存档的中间存储媒介,以优化磁带的写入性能并保证在磁带出错时也能备份数据。

Amanda是当前最流行的免费备份解决方案,目前Amanda最新的稳定版本是2.5.2p2。通过 http://www.amanda.org站点可以免费获得。

Amanda工作方式

Amanda 综合使用完全备份和增量备份来保存所负责的全部数据,使用最小的、有可能是每日的备份集。一台 Amanda 服务器可以备份任意数量执行 Amanda 的客户机或是将连上 Amanda 服务器的计算机上的数据备份到一台磁带机上。一个常见的问题是,数据写入磁带机的时间将超过取行数据的时间,而 Amanda 解决了这个问题。它使用一个 “holding disk” 来同时备份几个文件系统。 Amanda 建立 “archive sets” 的一组磁带,用来备份在 Amanda 的配置文件中所列出的完整的文件系统。

Amanda 的整体策略是:在每次周期中完成一次数据的完全备份,并且确保在两次完全转储之间备份所有更改的数据。传统的做法是先执行完全备份,然后在此期间执行增量 备份。而Amanda 的工作方式不同的是,每次运行Amanda 都对部分数据进行完全备份,确切地说,就是在一个完整的备份周期内备份全部数据所需备份的其中一部分。例如,如果周期为 7 天,且一个周期内进行7次备份,则每天必须备份 1/7 的数据,以便在 7 天之内完成一次完全备份。除了这个“部分”完全备份外,Amanda 还对自最近一次完全备份后更改的数据进行增量备份。Amanda这种特有的备份策略,可以减少每次备份的数据量。

不适用tape的方式

Amanda客户端的配置

升级的yum配置

cat /etc/yum.repos.d/iso.repo

[ISO]

name=ISO

baseurl=http://172.16.1.134:14480/rhel/

enabled=1

gpgcheck=0

yum安装amanda

yum -y install amanda.x86_64 amanda-client.x86_64

设置xinetd中的amanda

cat /etc/xinetd.d/amanda

# default: off

# description: The client for the Amanda backup system.\

# This must be on for systems being backed up\

# by Amanda.

service amanda

{

socket_type = dgram

protocol = udp

wait = yes

user = amanda

group = disk

server = /usr/lib64/amanda/amandad

disable = no

}

/etc/init.d/xinetd restart

配置允许访问的服务器主机名、amanda帐户

cd /var/lib/amanda/

vi .amandahosts

#amandahost amanda

#amandahost.localdomain amanda

ba amanda

ba root

将服务器的主机名以及用于备份的用户名写在.amandahosts中(这里的Amanda 服务器名为ns2 ,用于备份的帐号为:amanda ),同时,也需要把服务器和root用户的对应关系加在里面,否则在恢复数据的时候将不能访问服务器。在这里设置完Amanda 服务器的主机名后,同时也要在 /etc/hosts文件里面指定Amanda 服务器IP和主机名的对应关系,否则Amanda 客户端将不能访问服务端。

配置hosts文件

cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

::1 localhost6.localdomain6 localhost6

172.16.1.138 sql2.lvs.local sql2

172.16.1.146 ba

二,服务端配置

yum –y install amanda.x86_64 amanda-client.x86_64 amanda-devel.x86_64 amanda-server.x86_64

这里采用磁盘来作备份,即disk -to-disk 方式

1./etc/amanda/DailySet1/amanda.conf

Amanda 的所有备份策略和执行命令,均通过 “DailySet1”这个目录下的几个配置文档来定义。
下面是部分需要修改的参数

# vi amanda .conf
org "ns2"     //设置使用amanda 的单位或者机构的名称
mailto "amanda @atyu30.com"//指定将报告发送的邮件地址
dumpuser amanda //指定使用Amanda 备份的用户,默认为amanda 用户
dumpcycle 7days //设置备份周期的长度,单位也可以是weeks,在这里设置7days和1weeks的效果是一样的。
runspercycle 7 //设置每个备份周期内amanda 运行的次数
tapetype HARD -DISK //设置存储类型
labelstr "^DailySet1-[0-9][0-9]*$"//定义卷标格式
logdir "/var/log/amanda " //指定日志存放路径,默认存放在amanda 配置目录下
tpchanger "chg-disk " //更换磁带的脚本
changerfile "/etc/amanda /DailySet1/changer"//
tapedev "file:/amanda /DailySet1" //指定存储位置
define dumptype root-tar { //定义转存储类
   global //调用前面定义的global类型
   program "GNUTAR" //使用GNU tar作为备份程序,默认是DUMP
   comment "root partitions dumped with tar" //描述该类型的信息
   compress none //不采用压缩
   index yes //备份集索,必须为yes(默认为no),否则在恢复的时候将不能找到可恢复的索引信息
   priority low

}
define tapetype HARD -DISK { //定义磁盘类型
comment "disk -to-disk "
length 1000 mbytes
}

2. 创建虚拟磁带 虚拟磁带的目录结构如下:
slot_root_dir -|
|- info
|- data -> slot1/
|- slot1/
|- slot2/
|- ...
|- slotn/

slot_root_dir是tapedev所指定的路径,而slotn中的n的值应和tapecycle的值一致。如下:

# mkdir /amanda /DailySet1
# cd /amanda /DailySet1/
# mkdir slot1 slot2
# touch info
# ln -s slot1 data
# chown -R amanda .disk /amanda

3. 添加备份项,这里备份10.0.0.1上的data目录

# vi /etc/amanda /DailySet1/disklist
10.0.0.1 /data comp-root-tar

4. 创建tapelist文件

# touch /etc/amanda /DailySet1/tapelist
# chown amanda .disk /etc/amanda /DailySet1/tapelist

5. 制作虚拟磁盘卷标 与使用磁带机一样,使用前也需要为虚拟磁盘创建卷标,如下:

# su - amanda
$ /usr/sbin/amlabel DailySet1 DailySet1-01 slot 1
changer: got exit: 0 str: 1 file:/amanda /Dailyset1
labeling tape in slot 1 (file:/amanda /Dailyset1):
rewinding, reading label, not an amanda tape (Read 0 bytes)
rewinding, writing label DailySet1-01, checking label, done.
$ /usr/sbin/amlabel DailySet1 DailySet1-02 slot 2

6. 检查配置 Amanda 自带了一个检测配置文件的工具,用于检测整个Amanda 服务端与客户端的配置情况。

先建立如下文件:
/etc/amanda/DailySet1 该目录下先建立如下文件
# mkdir -p /etc/amanda /DailySet1/curinfo/10.0.0.1/_var_log
# tuoch /etc/amanda /DailySet1/curinfo/10.0.0.1/_var_log/info
# mkdir -p /etc/amanda /DailySet1/curinfo/localhost/_etc
# touch /etc/amanda /DailySet1/curinfo/localhost/_etc/info
# mkdir -p /etc/amanda /DailySet1/curinfo/10.0.0.1/localhost
# mkdir -p /etc/amanda /DailySet1/index/localhost/_etc
# touch /etc/amanda /DailySet1/index/localhost/_etc/info
# mkdir -p /etc/amanda /DailySet1/index/10.0.0.1/_var_log
# chown -R amanda .disk /etc/amanda /DailySet1/curinfo
# chown -R amanda .disk /etc/amanda /DailySet1/index
权限问题很麻烦,千万不要犯晕
测试:
$ /usr/sbin/amcheck DailySet1 Amanda Tape Server Host Check Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps/amanda : 3510768 KB disk space available, using 3408368 KB
slot 2: read label `DailySet1-02', date `X'
NOTE: skipping tape-writable test
Tape DailySet1-02 label ok
Server check took 0.131 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.100 seconds, 0 problems found
(brought to you by Amanda 2.5.0p2)

7. 备份 Amanda 中备份数据使用的程序是amdump,通常情况下放在cron里去自动执行,amdump在备份时不会提示任何的信息,可以通过查看日志文件来检查备份是否成功。

$ /usr/sbin/amdump DailySet1
8. 恢复 Amanda 提供了交互式的amrecover工具来从Amanda 的 备份中恢复文件,它需要备份集设置了索引,也就是使用了“index yes”的设置,同时在服务端需要启动amandaidx与amidxtape进程,这两个进程也是由xinetd来管理的。在客户端恢复数据的时候必须 使用root用户来运行。恢复前首先要切换到需要恢复的当前目录下,Amrecover工具的使用方法如下: # amrecover DarilySet1 -s serverhost -t serverhost 上面命令中的-s 参数表示指定存放备份集索引的服务器,-t则用于指定磁带机所在的服务器。连接成功后将会停在一个交互式的对话框

备份多个需要建立多个/etc/Amanda/DailySetX(x=1,2,3,4,5,6)等多个,每一个对应一个/amanda下/DailySetX

二、服务端配置

1 amanda.conf

Amanda配置文档默认路径在/etc/amanda/DailySet1,在前面提到过,Amanda一个目录对应一个配置,Amanda的所有备份策略和执行命令,均通过“DailySet1”这个目录下的几个配置文档来定义。

在amanda.conf里面通常需要设置的有如下部分:

org "turbolinux"

设置使用amanda的单位或者机构的名称

mailto "root@turbolinux.com.cn "

指定将报告发送的邮件地址

dumpuser amanda

指定使用Amanda备份的用户,默认为amanda用户

dumpcycle 7days

设置备份周期的长度,单位也可以是weeks,在这里设置7days和1weeks的效果是一样的。

runspercycle 7

设置每个备份周期内amanda运行的次数

tapecycle 1 tapes

设定完成一个完整的备份周期最少所需要磁带,这个需要根据备份数据量的大小来设定

ctimeout 30

设置检测客户端超时时间,单位为秒

runtapes 1

amdump每次运行使用磁带最大数

tapedev "/dev/nst0"

指定使用磁带机的设备名称,“/dev/nst0”表示不倒带设备。

tpchanger " chg-manual"

更换下一个磁带的脚本。在disk-to-tape方式中它与tapedev只能使用其中一个,建议将该项注释掉。

tapetype HP-DAT

指定磁带类型,下面将讲到如何去定义磁带类型。

labelstr "^DailySet1-[0-9][0-9]*$"

设定磁带卷标格式,使用正则表达式去匹配卷标名称,磁带在使用之前,必须使用 amlabel 指定卷标,下面将会讲到amlabel的用法。

logdir "/var/log/amanda"

指定日志文件存放的目录,默认存放在amanda配置目录下

indexdir "/var/adm/index"

指定存放备份集索引数据目录,默认为amanda配置目录下的index目录

在配置文件中包含了许多预定义的磁带类型,所以一般都不需要自己手工去定义磁带类型,关于定义磁带类型的格式以及参数见如下:

define tapetype HP-DAT {
   comment "DAT tape drives" 对于磁带类型的描述
   length 1930 mbytes 磁带的容量
   filemark 111 kbytes 文件标志大小
   speed 468 kbytes 磁带驱动器速度
   }

上面的内容表示对HP-DAT这台磁带类型的定义,磁带类型的参数尤其重要,所以不要乱修改里面的参数。

holdingdisk hd1 {
   directory "/dumps/amanda" 临时磁盘存放的路径
   use 5 Gb 临时磁盘总共可以使用的大小
   }

上面是对临时存储磁盘的定义,同时可以定义多个临时磁盘,在分配临时磁盘的大小有两种设定方法,一种是指定临时磁盘可以使用的大小,当值为0是则使用所有剩余空间;另一种是在临时磁盘这个文件系统上始终保留一定的空间,其余的则全部分配给临时磁盘使用。

在amanda.conf文件,最后需要配置的就是定义转储类型,转储类型里面主要定义备份时使用的程序,压缩的类型等。如下:

define dumptype root-tar {
   global 调用前面定义的global类型
   program "GNUTAR" 使用GNU tar作为备份程序,默认是DUMP
   comment "root partitions dumped with tar" 描述该类型的信息
   compress none 不采用压缩
   exclude list "/etc/amanda/exclude.gtar" 排除备份文件的列表
   }

在 每个转储类型的定义中,都可以调用前面定义好的类型。如果需要对备份的数据进行压缩,有两种方式可以实现,一种是在客户端压缩,那么可在compress 项设置为“compress client fast”或“compress client best”,另一种是在服务器进行压缩,则设置为“compress server fast”或“compress server best”。

2 disklist

接下来需要修改的是disklist文件,该文件存放在配置目录下,disklist用于指定实际要备份的数据,里面的格式是:

client partition/mountpoint dumptype

client :需要备份的客户度计算机,可以是IP或者主机名;

partition/mountpoint: 指定要备份的内容,可以是设备名或挂载点。

dumptype:指定备份数据时使用的转储类型,这是在amanda.conf文件里面所定义的。

例如:现在需要备份IP为192.168.1.100的客户端下面的/data目录,并使用“root-tar”的转储类型,那么只需要在disklist文件里插入如下即可。

192.168.1.100 /data root-tar

3 、创建 tapelist 和磁带标签

tapelist文件用来记录当前可用的磁带列表,默认该文件不存在,创建该文件以及修改文件的权限的方法如下:

# > /etc/amanda/DailySet1/tapelist
   # chown amanda.disk /etc/amanda/DailySet1/tapelist

注:凡是手工创建或指定给amanda的文件以及目录,包括前面所指定的临时磁盘存放的目录以及日志存放的目录等,其所属用户和组必须是amanda和disk,否则Amanda在备份的时候没有操作权限。

切换至amanda用户,执行amlabel命令设置卷标

# su – amanda
   $ /usr/sbin/amlabel DailySet1 DailySet1-01

所设置的卷标一定要符合“labelstr”所指定的正则表达式,否则会报错。设置好可用卷标的磁带,会自动添加到tapelist列表里。

三、配置实例

Amanda目前也可以基于磁盘来做备份,即disk-to-disk方式,也是一个相对比较复杂的方式,下面是一个基于磁盘备份以及恢复的详细过程。

1、客户端配置

在.amandahosts文件中指定备份服务器与用户以及在/etc/hosts文件设置IP与主机名的对应关系,同时在xinetd中启动amanda服务,具体操作见前面的说明。

# vi /var/lib/amanda/.amandahosts
   holmes86 amanda
   holmes86 root
   # vi /etc/hosts
   192.168.1.99 holmes86

此后的配置步骤都是在服务端进行。

2、创建虚拟磁带的文件系统

所谓基于磁盘的备份方式,就是在服务器上使用磁盘来作为一个虚拟的磁带机。所以需要准备一块容量较大的分区或磁盘,创建好文件系统后挂载在指定的目录下。

# mount /dev/hda6 /amanda

3、定义虚拟磁带类型

编 辑amanda.conf文件,定义一个新的磁带类型,而磁带的大小可以根据自己的需要来设置。一块磁盘可以平均划分多个磁带,考虑到磁盘的性能,建议在 使用中始终保留10%的空间。比如一块100G的磁盘,就按90G空间去划分磁带,如果在90G的空间里创建3个虚拟磁带,那每个磁带能够使用的大小就是 30G。下面定义了每个虚拟磁带的大小为200M:

define tapetype HARD-DISK {
   comment "disk-to-disk"
   length 200 mbytes
   }

4、修改amanda.conf文件

在amanda.conf配置文件中,其它需要修改的参数是:

dumpcycle 2 days
   runspercycle 2
   tapecycle 2
   tapetype HARD-DISK
   labelstr "^DailySet1-[0-9][0-9]*$"
   tpchanger "chg-disk"
   changerfile "/etc/amanda/DailySet1/changer"
   tapedev "file:/amanda/DailySet1"
   define dumptype root-tar {
   global
   program "GNUTAR"
   comment "root partitions dumped with tar"
   compress none
   index yes
   priority low
   }

其中tapedev中指定的“/amanda/DailySet1”,“DailySet1”是配置文件名,该目录名必须与配置文件名一致。同时一定要在定义转储类型的部分加上“index yes“,否则在恢复的时候将不能找到可恢复的索引信息。

5、创建虚拟磁带

虚拟磁带的目录结构如下:

slot_root_dir -|
   |- info
   |- data -> slot1/
   |- slot1/
   |- slot2/
   |- ...
   |- slotn/

slot_root_dir是tapedev所指定的路径,而slotn中的n的值应和tapecycle的值一致。如下:

  # mkdir /amanda/DailySet1
  # cd /amanda/DailySet1/
  # mkdir slot1 slot2
  # touch info
  # ln -s slot1 data
  # chown -R amanda.disk /amanda

6、修改disklist文件

编辑disklist文件,增加需要备份的项,如下:

192.168.1.100 /data comp-root-tar

7、创建disklist文件

# > /etc/amanda/DailySet1/tapelist
# chown amanda.disk /etc/amanda/DailySet1/tapelist

8、制作虚拟磁盘卷标

与使用磁带机一样,使用前也需要为虚拟磁盘创建卷标,如下:

# su - amanda
$ /usr/sbin/amlabel DailySet1 DailySet1-01 slot 1
$ /usr/sbin/amlabel DailySet1 DailySet1-02 slot 2

9、检查配置

Amanda自带了一个检测配置文件的工具,用于检测整个Amanda服务端与客户端的配置情况。如下:

$ /usr/sbin/amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /amanda: 419077 KB disk space available, using 316677 KB
slot 1: read label `DailySet1-01', date `X'
NOTE: skipping tape-writable test
Tape DailySet1-01 label ok
Server check took 0.151 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.100 seconds, 0 problems found
(brought to you by Amanda 2.5.0p2)

10、备份

在前面的Amanda组件中提到过,备份数据使用的程序是amdump,通常情况下放在cron里去自动执行,amdump在备份时不会提示任何的信息,可以通过查看日志文件来检查备份是否成功。

$ /usr/sbin/amdump DailySet1

11、恢复

Amanda 提供了交互式的amrecover工具来从Amanda的备份中恢复文件,它需要备份集设置了索引,也就是使用了“index yes”的设置,同时在服务端需要启动amandaidx与amidxtape进程,这两个进程也是由xinetd来管理的。在客户端恢复数据的时候必须 使用root用户来运行。恢复前首先要切换到需要恢复的当前目录下,Amrecover工具的使用方法如下:

# amrecover DarilySet1 -s serverhost -t serverhost

上面命令中的-s 参数表示指定存放备份集索引的服务器,-t则用于指定磁带机所在的服务器。连接成功后将会停在一个交互式的对话框下,下面是一个详细的恢复过程。

#cd /data
# amrecover DailySet1 -s holmes86 -t holmes86
AMRECOVER Version 2.5.0p2. Contacting server on holmes86 ...
220 holmes86 AMANDA index server (2.5.0p2) ready.
200 Access OK
Setting restore date to today (2007-08-05)
200 Working date set to 2007-08-05.
Scanning /amanda...
DailySet1: skipping cruft directory, perhaps you should delete it.
200 Config set to DailySet1.
200 Dump host set to holmes86.
Trying disk /data ...
$CWD '/data' is on disk '/data' mounted at '/data'.
200 Disk set to /data.
/data
amrecover> ls 浏览备份的数据
2007-08-05 sbin/
2007-08-05 lost+found/
2007-08-05 boot/
2007-08-05 bin/
2007-08-05 .
amrecover> add bin 增加一个恢复的列表
Added dir /bin at date 2007-08-05
amrecover> extract 执行恢复
Extracting files using tape drive null: on host holmes86.
The following tapes are needed: DailySet1-02
Restoring files into directory /data
Continue [?/Y/n]? y
Extracting files using tape drive null: on host holmes86.
Load tape DailySet1-02 now
Continue [?/Y/n/s/t]? y
./bin/
./bin/alsacard
............
./bin/zsh
amrecover> quit
200 Good bye.

问题总结
在正常进行第一次备份后,再进行第二次备份时,提示要插入新的磁带,而实际上磁带并没有使用完,amcheck时发现有如下信息:
cannot overwrite active tape DailySet1-01
造成这个问题的原因是,
dumpcycle(天为单位)的值小于tapecycle的值,一般来说dumpcycle的值至少比tepacycle大,修改这两者的值就可以了。

# cat /etc/amanda/DailySet1/amanda.conf |grep -v ^#|grep -v $^

org "lvs" # your organization name for reports

mailto "qchangchun@telecare.cc" # space separated list of operators at your site

dumpuser "amanda" # the user to run dumps under

inparallel 4 # maximum dumpers that will run in parallel (max 63)

# this maximum can be increased at compile-time,

# modifying MAX_DUMPERS in server-src/driverio.h

dumporder "sssS" # specify the priority order of each dumper

# s -> smallest size

# S -> biggest size

# t -> smallest time

# T -> biggest time

# b -> smallest bandwitdh

# B -> biggest bandwitdh

# try "BTBTBTBTBTBT" if you are not holding

# disk constrained

taperalgo first # The algorithm used to choose which dump image to send

# to the taper.

# Possible values: [first|firstfit|largest|largestfit|smallest|last]

# Default: first.

# first First in - first out.

# firstfit The first dump image that will fit on the current tape.

# largest The largest dump image.

# largestfit The largest dump image that will fit on the current tape.

# smallest The smallest dump image.

# last Last in - first out.

displayunit "k" # Possible values: "k|m|g|t"

# Default: k.

# The unit used to print many numbers.

# k=kilo, m=mega, g=giga, t=tera

netusage 600 Kbps # maximum net bandwidth for Amanda, in KB per sec

dumpcycle 4 weeks # the number of days in the normal dump cycle

runspercycle 20 # the number of amdump runs in dumpcycle days

# (4 weeks * 5 amdump runs per week -- just weekdays)

tapecycle 25 tapes # the number of tapes in rotation

# 4 weeks (dumpcycle) times 5 tapes per week (just

# the weekdays) plus a few to handle errors that

# need amflush and so we do not overwrite the full

# backups performed at the beginning of the previous

# cycle

bumpsize 20 Mb # minimum savings (threshold) to bump level 1 -> 2

bumppercent 20 # minimum savings (threshold) to bump level 1 -> 2

bumpdays 1 # minimum days at each level

bumpmult 4 # threshold = bumpsize * bumpmult^(level-1)

etimeout 300 # number of seconds per filesystem for estimates.

dtimeout 1800 # number of idle seconds before a dump is aborted.

ctimeout 30 # maximum number of seconds that amcheck waits

# for each client host

tapebufs 20

runtapes 1 # number of tapes to be used in a single run of amdump

tpchanger "chg-disk" # the tape-changer glue script

tapedev "file:/amanda/DailySet1" # the no-rewind tape device to be used

rawtapedev "/dev/null" # the raw device to be used (ftape only)

changerfile "/etc/amanda/DailySet1/changer"

changerdev "/dev/null"

maxdumpsize -1 # Maximum number of bytes the planner will schedule

# for a run (default: runtapes * tape_length).

tapetype HARD-DISK # what kind of tape it is (see tapetypes below

labelstr "^DailySet1-[0-9][0-9]*$" # label constraint regex: all tapes must match

amrecover_do_fsf yes # amrecover will call amrestore with the

# -f flag for faster positioning of the tape.

amrecover_check_label yes # amrecover will call amrestore with the

# -l flag to check the label.

amrecover_changer "null:" # amrecover will use the changer if you restore

# from this device.

# It could be a string like 'changer' and

# amrecover will use your changer if you

# set your tape with 'settape changer'

holdingdisk hd1 {

comment "main holding disk"

directory "/dumps/amanda" # where the holding disk is

use -100 Mb # how much space can we use on it

# a non-positive value means:

# use all space but that value

chunksize 1Gb # size of chunk if you want big dump to be

# dumped on multiple files on holding disks

# N Kb/Mb/Gb split images in chunks of size N

# The maximum value should be

# (MAX_FILE_SIZE - 1Mb)

# 0 same as INT_MAX bytes

}

autoflush no #

infofile "/etc/amanda/DailySet1/curinfo" # database DIRECTORY

logdir "/etc/amanda/DailySet1" # log directory

indexdir "/etc/amanda/DailySet1/index" # index directory

define tapetype QIC-60 {

comment "Archive Viper"

length 60 mbytes

filemark 100 kbytes # don't know a better value

speed 100 kbytes # dito

}

define tapetype DEC-DLT2000 {

comment "DEC Differential Digital Linear Tape 2000"

length 15000 mbytes

filemark 8 kbytes

speed 1250 kbytes

}

define tapetype DLT {

comment "DLT tape drives"

length 20000 mbytes # 20 Gig tapes

filemark 2000 kbytes # I don't know what this means

speed 1536 kbytes # 1.5 Mb/s

}

define tapetype SURESTORE-1200E {

comment "HP AutoLoader"

length 3900 mbytes

filemark 100 kbytes

speed 500 kbytes

}

define tapetype EXB-8500 {

comment "Exabyte EXB-8500 drive on decent machine"

length 4200 mbytes

filemark 48 kbytes

speed 474 kbytes

}

define tapetype EXB-8200 {

comment "Exabyte EXB-8200 drive on decent machine"

length 2200 mbytes

filemark 2130 kbytes

speed 240 kbytes

}

define tapetype HP-DAT {

comment "DAT tape drives"

# data provided by Rob Browning <rlb@cs.utexas.edu>

length 1930 mbytes

filemark 111 kbytes

speed 468 kbytes

}

define tapetype DAT {

comment "DAT tape drives"

length 1000 mbytes # these numbers are not accurate

filemark 100 kbytes # but you get the idea

speed 100 kbytes

}

define tapetype MIMSY-MEGATAPE {

comment "Megatape (Exabyte based) drive through Emulex on Vax 8600"

length 2200 mbytes

filemark 2130 kbytes

speed 170 kbytes # limited by the Emulex bus interface, ugh

}

define tapetype HARD-DISK{

comment "disk-to-disk"

length 100000 mbytes

}

define dumptype global {

comment "Global definitions"

# This is quite useful for setting global parameters, so you don't have

# to type them everywhere. All dumptype definitions in this sample file

# do include these definitions, either directly or indirectly.

# There's nothing special about the name `global'; if you create any

# dumptype that does not contain the word `global' or the name of any

# other dumptype that contains it, these definitions won't apply.

# Note that these definitions may be overridden in other

# dumptypes, if the redefinitions appear *after* the `global'

# dumptype name.

# You may want to use this for globally enabling or disabling

# indexing, recording, etc. Some examples:

# index yes

# record no

# split_diskbuffer "/raid/amanda"

# fallback_splitsize 64m

}

define dumptype always-full {

global

comment "Full dump of this filesystem always"

compress none

priority high

dumpcycle 0

}

define dumptype root-tar {

global

program "GNUTAR"

comment "root partitions dumped with tar"

compress none

index

priority low

}

define dumptype user-tar {

root-tar

comment "user partitions dumped with tar"

priority medium

}

define dumptype user-tar-span {

root-tar

tape_splitsize 3 Gb

comment "tape-spanning user partitions dumped with tar"

priority medium

}

define dumptype high-tar {

root-tar

comment "partitions dumped with tar"

priority high

}

define dumptype comp-root-tar {

root-tar

comment "Root partitions with compression"

compress client fast

}

define dumptype comp-user-tar {

user-tar

compress client fast

}

define dumptype comp-user-tar-span {

user-tar-span

compress client fast

}

define dumptype holding-disk {

global

comment "The master-host holding disk itself"

holdingdisk no # do not use the holding disk

priority medium

}

define dumptype comp-user {

global

comment "Non-root partitions on reasonably fast machines"

compress client fast

priority medium

}

define dumptype comp-user-span {

global

tape_splitsize 5 Gb

comment "Tape-spanning non-root partitions on reasonably fast machines"

compress client fast

priority medium

}

define dumptype nocomp-user {

comp-user

comment "Non-root partitions on slow machines"

compress none

}

define dumptype nocomp-user-span {

comp-user-span

comment "Tape-spanning non-root partitions on slow machines"

compress none

}

define dumptype comp-root {

global

comment "Root partitions with compression"

compress client fast

priority low

}

define dumptype nocomp-root {

comp-root

comment "Root partitions without compression"

compress none

}

define dumptype comp-high {

global

comment "very important partitions on fast machines"

compress client best

priority high

}

define dumptype nocomp-high {

comp-high

comment "very important partitions on slow machines"

compress none

}

define dumptype nocomp-test {

global

comment "test dump without compression, no /etc/dumpdates recording"

compress none

record no

priority medium

}

define dumptype comp-test {

nocomp-test

comment "test dump with compression, no /etc/dumpdates recording"

compress client fast

}

define dumptype custom-compress {

global

program "GNUTAR"

comment "test dump with custom client compression"

compress client custom

client_custom_compress "/usr/bin/bzip2"

}

define dumptype encrypt-fast {

global

program "GNUTAR"

comment "test dump with fast client compression and server symmetric encryption"

compress client fast

encrypt server

server_encrypt "/usr/local/sbin/amcrypt"

server_decrypt_option "-d"

}

define interface local {

comment "a local disk"

use 1000 kbps

}

define interface le0 {

comment "10 Mbps ethernet"

use 400 kbps

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值