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 پیادهسازی شده است. این برنامه از یک فضای ذخیرهسازی پشتیبان (“بانک”) استفاده میکند که در آن فایلهای پشتیبان را بر اساس بازه زمانی قرار میدهد (که به این فایلها “صندوق” گفته میشود).
/etc/dirvish/master.conf قرار دارد. در این فایل میتوان محل ذخیرهسازی فایلهای پشتیبان، فهرست “صندوقها” برای مدیریت و مقدار پیشفرض برای تاریخ انقضای آنها را مشخص کرد. باقی پیکربندی در فایلهای 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 1bank 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/**
*.bakhostname معلوم میشود را وارد کنیم)، به خصوص آنهایی که در مسیر ریشه قرار دارند (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).