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 (dal pacchetto omonimo) viene utilizzato quotidianamente per eseguire il backup di questi server diversi.
rsync è preceduto da una duplicazione del contenuto del backup precedente con collegamenti fisici, il che impedisce l'utilizzo eccessivo di spazio su disco. Il processo rsync quindi sostituisce solo i file che sono stati modificati dall'ultimo backup. Con questo meccanismo un gran numero di backup può essere mantenuto in una piccola quantità di spazio. Dal momento che tutti i backup sono immediatamente disponibili e accessibili (per esempio, in diverse directory di una determinata condivisione della rete), è possibile fare rapidamente paragoni tra due date.
dirvish. Utilizza uno spazio di archiviazione di backup («banca» nel suo vocabolario), in cui colloca copie con l'indicazione della data di insiemi di file di backup (questi insiemi sono chiamati «casseforti» («vault») nella documentazione di dirvish).
/etc/dirvish/master.conf. Esso definisce la posizione dello spazio di archiviazione di backup, l'elenco delle «casseforti» da gestire, ed i valori predefiniti per la scadenza dei backup. Il resto della configurazione si trova nel file banca/cassaforte/dirvish/default.conf e contiene una configurazione specifica per il corrispondente insieme di file.
Esempio 9.3. Il file /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.
Esempio 9.4. Il file /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), in particolare quelli nell'albero radice (tree: /), eccetto quelli elencati in exclude. Il backup sarà limitato ai contenuti di un file system (xdev: 1). Non include i file da altri punti di mount. Sarà generato un indice dei file salvati (index: gzip), e il nome dell'immagine sarà creato in base alla data corrente (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 Sezione 13.3.1, «GNOME» for more information about this).