rdiff-backup rdiff备份 is a popular, free, open source mirroring and incremental backup system for posix based operating systems like linux & Mac OS X. It uses rysnc algorithm through librsync but it doesn’t use rsync.是一个受欢迎的,免费,自由,开放源码镜像和增量备份系统的POSIX为基础的操作系统,例如Linux和Mac OS X上使用rysnc算法通过librsync ,但并不需要使用rsync 。 The documentation of rdiff-backup focuses on push model for backup where client machines pushes their backup data to backup server.文件rdiff备份的重点是推动模式备份的地方客户端机器推动他们的数据备份到备份服务器。 This model is problematic when the backup server is on a well protected secure network behind a firewall.这种模式是有问题时,备份服务器是在一个很好的保护网络安全防火墙后面。 Client machines on external servers cannot easily connect to a machine behind firewall without punching a hole which reduces security of the system.客户端机器对外部服务器不能轻易连接到一台机器在防火墙后面,没有冲压一个洞,从而降低了系统的安全性。 A better alternative is to use the pull model where the backup server requests for backup from client machine, at regular intervals, over secure ssh connection.较好的替代方法是使用下拉模型,其中备份服务器的要求从备份客户机上,定期,超过安全的ssh连接。

The steps are as follows:步骤如下:
1. 1 。 Create a account on the backup server just for backup purposes.创建一个帐户,备份服务器只是为了备份的目的。 I named mine backup. i命名为排雷备份。 The account password should be disabled.帐户密码,应禁用。 For example you might have the following entries in your passwd/shadow files:例如,您可能有以下的参赛作品在您的密码/阴影档案:

/etc/passwd在/ etc /密码
backup:x:99:99:backup:/backup:/bin/false备份: x : 99:99 :备份: /备份: /斌/虚假
/etc/shadow在/ etc /阴影
backup:!!:12644:0:99999:7:::备份: ! : 12644:0:99999:7 : : :

A simple way is to create the account using useradd.一个简单的方法是要创建帐户使用useradd 。

2. 2 。 Setup安装 ssh to allow you to login without password ssh到让您没有登录密码 from your backup server (backup account) to client machines which you want to backup.从您的备份服务器(备份帐户)到用户端机器,您要备份。

3. 3 。 Install rdiff-backup on your backup machine as well as on all the client machines安装rdiff备份您的备用机,以及为所有客户端机器

3. 3 。 Create an ssh config alias, for each client machine, which defines how to contact client with the backup key.创建一个SSH的配置别名,每个客户端的机器,它定义了如何联系客户端与备份的关键。 Place the following, per client machine, into /backup/.ssh/config:地方以下,每客户机上,到/备份/ .ssh /配置:

host client1-backup 东道国client1备份
hostname client1 主机client1
user root 用户根
identityfile /backup/.ssh/id_rsa identityfile /备份/ .ssh / id_rsa
compression yes 压缩是
protocol 2 议定书2

4. 4 。 Perform a test backup执行测试的备份
rdiff-backup client1-backup::/tmp client1-backup rdiff备份client1备份: : / tmp的client1备份

5. 5 。 Setup cron job for unattended daily backup安装作业,为无人值守每日备份

There is much more you can do to further customize the process.有很大的越多,您可以做进一步自定义的过程。 However the steps above should get you started.不过,上述步骤应让您轻松上路。