Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3277794
  • 博文数量: 815
  • 博客积分: 12898
  • 博客等级: 上将
  • 技术积分: 7883
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-25 09:57
文章分类

全部博文(815)

文章存档

2014年(1)

2011年(46)

2010年(192)

2009年(121)

2008年(70)

2007年(385)

分类: BSD

2007-10-19 23:44:21

(Advanced Maryland Network Disk Archiver) 并非单一的程序,而是一个客户机/服务器模式的备份系统 。一台 Amanda 服务器可以备份任意数量执行 Amanda 的客户机或是将连上 Amanda 服务器的计算机上的数据备份到一台磁带机上。一个常见的问题是,数据写入磁带机的时间将超 过取行数据的时间,而 Amanda 解决了这个问题。它使用一个 “holding disk” 来同时备份几个文件系统。 Amanda 建立 “archive sets” 的一组磁带,用来备份在 Amanda 的配置文件中所列出的完整的文件系统。Amanda 配置文件提供完整的备份控制及 Amanda 产生的网络传输。 Amanda 可以使用上述任何一个设备程序来向磁带写入数据。Amanda 可以从 port 或 package 取得,它并非系统默认安装的。
Amanda系统包含如下组件:
1、客户端程序,是amandad 其中最重要的。此后台程序在备份运行时和 Amanda 服务器进行通信。在/usr/local/libexec/amanda目录下,还有其它的一些客户端程序:
amandad 处理客户机和中央服务器之间的所有通信;运行所有其它的客户端程序;
selfcheck 验证本地Amanda 配置;
sendsize 估计备份大小;
sendbackup 执行备份操作;
这些程序是 Amanda 客户端系统的一部分。但是并不能通过手工去执行他们,是由客户端包的其他辅助程序来调用这些程序。
2、执行各阶段实际备份操作的服务器程序。amdump 程序启动 Amanda ,并且常常使用 cron 定期运行。它控制一些其他程序,包括:
planner 决定备份哪些内容;
driver 设备接口;
dumper 与客户端 amandad 进程进行通信;
taper 把数据写入媒介;
amreport 准备 Amanda 运行的报告;
3、执行相关任务的管理工具,包括:
amcheck 验证 Amanda 配置的有效性以及此工具是否准备运行;
amlabel 在磁带上写入Amanda卷标,用于避免覆盖错磁带;
amcleanup 在中断或系统崩溃后进行清理;
amflush 强制把临时保存区的数据写入备份媒介;
amadmin 查出要恢复的正确磁带,并执行各种其它管理任务;


Amanda配置
1.
# pkg_add amanda-2.4.5.1p0.tgz
                                                
amanda-2.4.5.1p0: complete                                                  
--- amanda-2.4.5.1p0 -------------------
In order to update /etc/services and /etc/inetd.conf, run

   /usr/local/libexec/amanda/patch-system --enable-index --enable-tape

You should check both of these files, verifying proper installation.
Once verified issue the command:

   kill -HUP `cat /var/run/inetd.pid`

You also need to create /operator/.amandahosts, which will contain the
FQDN of the tape server and the user allowed to access this machine.
The contents should look like this:

   backup.openbsd.org operator

The permissions of /operator/.amandahosts must be restricted:

   chmod u=rw /operator/.amandahosts
   chown operator:operator /operator/.amandahosts

Sample configuration files have been installed in
/usr/local/share/examples/amanda.


gpg flavor only:

Setup AMANDA as usual and make sure compression is enabled for the
dumptype declarations you plan to use. Generate the master keys for
your backups. Keep those keys and a copy of them in a very SAFE and
RELIABLE place:

   gpg --gen-key ... follow instructions

Export your resulting public key (gpg --list-keys shows them)
for installation on the backup clients:

   gpg --armor --export $MASTER-PUBKEY-ID > /tmp/master-pub.key

You need an additional secret GPG key for the backup user on the
client. There is one drawback in this configuration, the key must be
setup without a password. After key generation import the master public
key from above:

   gpg --import /tmp/master-pub.key

The imported key needs to be signed otherwise gnupg will not run
properly in batch mode:

   gpg --sign-key $MASTER-PUBKEY-ID

Add the following variables to /etc/amanda/amanda.gpg.conf:

   gpg_home="/operator/.gnupg"  # keyring location
   gpg_id="$MASTER-PUBKEY-ID"   # pub key id of master key

If you want to restore your backups import the secret master key and
unset the password. After restoration of your data delete this key
again!
#
目录结构
/usr/local/libexec/amanda
/usr/local/share/doc/amanda
/usr/local/share/examples/amanda
/var/amanda
2.
# vi /etc/rc.conf.local
添加
inetd_enable=""
# vi /etc/inetd.conf
添加
amanda dgram udp wait operator /usr/local/libexec/amanda/amandad amandad
# vi /etc/ssh/sshd_config
添加
HostbasedAuthentication yes

阅读(2077) | 评论(0) | 转发(0) |
0

上一篇:备份数据

下一篇:RHEL 5 + Amanda

给主人留下些什么吧!~~