amanda
, bacula
, or BackupPC
. Those are client/server systems featuring many options, whose configuration is rather difficult. Some of them provide user-friendly web interfaces to mitigate this. For non-enterprise systems, administrators might want to check out rsnapshot
or rdiff-backup
. Users can easily create backups of their filesystems with timeshift
, fsarchiver
, duplicity
, or even dd
.
apt-cache search backup
.
rsync
命令 (取自同名的套件) 用於逐日備份這些伺服器。
rsync
命令優先於以硬連結複製內容,避免使用太多的硬碟空間。rsync
祗處理上次備份後,再被修改的檔案。以這個機制可使用較小的空間備份。因為所有的備份已經立即可得與可用 (例如,在同個網路的不同資料夾共享),可快速地比對兩個指定日期。
dirvish
程式執行。使用備份的儲存空間 (“空” 的),放置含時間戳記的備份檔案 (在 dirvish 文件中,這些檔案被稱為 “vaults”)。
/etc/dirvish/master.conf
檔案內。設定備份儲存空間的位置,管理 “vaults” 清單,以及備份到期的預設值。其他的組態位在 bank/vault/dirvish/default.conf
檔案內,包括對應檔案集的特殊組態。
範例 9.3. /etc/dirvish/master.conf
檔案
bank: /backup exclude: lost+found/ core *~ Runall: root 22:00 expire-default: +15 days expire-rule: # MIN HR DOM MON DOW STRFTIME_FMT * * * * 1 +3 months * * 1-7 * 1 +1 year * * 1-7 1,4,7,10 1
bank
setting indicates the directory in which the backups are stored. The exclude
setting allows you to indicate files (or file types) to exclude from the backup. The Runall
is a list of file sets to backup with a time-stamp for each set, which allows you to assign the correct date to the copy, in case the backup is not triggered at precisely the assigned time. You have to indicate a time just before the actual execution time (according to /etc/cron.d/dirvish
). Finally, the expire-default
and expire-rule
settings define the expiration policy for backups. The above example keeps forever backups that are generated on the first Sunday of each quarter, deletes after one year those from the first Sunday of each month, and after 3 months those from other Sundays. Other daily backups are kept for 15 days. The order of the rules does matter, Dirvish uses the last matching rule, or the expire-default
one if no other expire-rule
matches.
範例 9.4. /backup/root/dirvish/default.conf
檔案
client: rivendell.falcot.com tree: / xdev: 1 index: gzip image-default: %Y%m%d exclude: /var/cache/apt/archives/*.deb /var/cache/man/** /tmp/** /var/tmp/** *.bak
hostname
命令指定在地機器的名稱) 內的檔案,尤其是在根目錄之下的檔案 (tree: /
),除了列在 exclude
內的檔案。備份將限制在一個檔案系統的內容 (xdev: 1
)。將不包括來自掛載點的檔案。將生成一個儲存檔案索引 (index: gzip
),以及根據現在日期生成的映像檔 (image-default: %Y%m%d
)。
dirvish --vault vault --init
command. From there on the daily invocation of dirvish-runall
will automatically create a new backup copy just after having deleted those that expired.
dconf
(see 節 13.3.1, “GNOME” for more information about this).