帮我写一个amanda.conf用于配置D2D2T的示例
时间: 2024-03-09 07:47:10 浏览: 14
好的,以下是一个用于配置 D2D2T 备份策略的 amanda.conf 示例:
```
# 全局配置
org "My Backup Organization"
mailto "backup-admin@example.com"
dumpcycle 7
runspercycle 5
tapecycle 24
tpchanger "chg-disk"
# 定义磁盘备份
define dumptype global {
comment "Global Dumptype"
compress none
strategy standard
priority medium
holdingdisk yes
}
define dumptype disk {
comment "Disk Backup"
program "GNUTAR"
compress client fast
strategy standard
priority medium
holdingdisk yes
}
# 定义磁带备份
define tapetype d2d2t {
comment "Disk to Disk to Tape"
length 2000 mbytes
filemark 2
}
# 定义备份集合和备份计划
define tapetype example-tape {
comment "Example Tape"
length 800 mbytes
filemark 2
}
define changer chg-disk {
comment "Disk Changer"
tapedev "null:"
}
define holdingdisk hd1 {
comment "Holding Disk 1"
directory "/backup/hd1"
use -1000 mbytes
chunksize 1 mbytes
}
define tapelibrary example-library {
comment "Example Tape Library"
tapedev "file:/backup/tapes"
tpchanger "chg-disk"
}
define tapetype d2d2t {
comment "Disk to Disk to Tape"
}
define tapetype example-tape {
comment "Example Tape"
length 800 mbytes
filemark 2
}
define dumptype d2dt {
comment "Disk to Disk Backup"
program "GNUTAR"
compress client fast
strategy standard
priority medium
holdingdisk yes
}
define tapetype d2d2t {
comment "Disk to Disk to Tape"
}
define tapetype example-tape {
comment "Example Tape"
length 800 mbytes
filemark 2
}
define dumptype d2d2t {
comment "Disk to Disk to Tape Backup"
program "GNUTAR"
compress client fast
strategy standard
priority medium
holdingdisk yes
tapecycle 3 tapes
tapetype d2d2t
taperscan 1d
tapetype example-tape
}
# 配置备份策略
define tapetype d2d2t {
comment "Disk to Disk to Tape"
}
define tapetype example-tape {
comment "Example Tape"
length 800 mbytes
filemark 2
}
define dumptype d2d2t {
comment "Disk to Disk to Tape Backup"
program "GNUTAR"
compress client fast
strategy standard
priority medium
holdingdisk yes
tapecycle 3 tapes
tapetype d2d2t
taperscan 1d
tapetype example-tape
}
define tapetype d2d {
comment "Disk to Disk Backup"
}
define dumptype d2d {
comment "Disk to Disk Backup"
program "GNUTAR"
compress client fast
strategy standard
priority medium
holdingdisk yes
}
# 指定备份主机和备份集合
define amhost my-server {
comment "My Backup Host"
}
define dumptype {
global
disk
}
define tapetype {
d2d2t
example-tape
}
define tapetype example-tape {
comment "Example Tape"
length 800 mbytes
filemark 2
}
define changer chg-disk {
comment "Disk Changer"
}
define device hd1 {
comment "Holding Disk 1"
path "/backup/hd1"
labelstr "hd1-"
}
define device null {
comment "Null Device"
path "/dev/null"
}
define tapetype d2d2t {
comment "Disk to Disk to Tape"
}
define tapetype example-tape {
comment "Example Tape"
length 800 mbytes
filemark 2
}
# 定义备份计划
define schedule {
MyBackupSchedule "My Backup Schedule" {
period 1d
period 1w
period 1m
period 1y
tapecycle 3 tapes
tapetype d2d2t
taperscan 1d
tapetype example-tape
}
}
# 指定备份策略和备份计划
define host {
my-server
infofile "/var/lib/amanda/my-server/amanda-client.info"
amrecover "prevent"
auth "bsdtcp"
dumptype d2d2t {
global
disk
}
tapetype example-tape
holdingdisk hd1
tapelibrary example-library
changer chg-disk
device hd1 {
comment "Holding Disk 1"
}
}
# 指定备份计划和备份主机
define schedule MyBackupSchedule {
my-server
}
```
这个 amanda.conf 示例中,配置了磁盘备份、磁带备份、备份计划和备份策略,以实现 D2D2T 的备份策略。其中,备份数据先备份到磁盘上,然后再备份到磁带上,磁带的备份周期是 3 天,备份计划是每天、每周、每月和每年备份一次。需要根据实际情况修改配置,以适应不同的备份需求。