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.不過,上述步驟應讓您輕鬆上路。