Backup locale con BackuPc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 2: | Line 2: | ||
*Creare il file di configurazione: | *Creare il file di configurazione: | ||
sudoedit /etc/backuppc/crosrv02.pl | |||
<pre> | <pre> | ||
# Local server backup of / as user backuppc | # Local server backup of / as user backuppc | ||
# | # | ||
| Line 36: | Line 37: | ||
# in main config file before changing after backups have already been done. | # in main config file before changing after backups have already been done. | ||
$Conf{CompressLevel} = 3; | $Conf{CompressLevel} = 3; | ||
$Conf{BackupFilesExclude} = ['/proc', | |||
'/sys', | |||
'/dev', | |||
'/cdrom', | |||
'/floppy', | |||
'/mnt', | |||
'/var/spool/squid', | |||
'/lost+found']; | |||
</pre> | </pre> | ||
| Line 42: | Line 50: | ||
echo "crosrv02 0 backup@croalliance.com backuppc" | sudo tee /etc/backuppc/hosts > /dev/null | echo "crosrv02 0 backup@croalliance.com backuppc" | sudo tee /etc/backuppc/hosts > /dev/null | ||
* Sistemare le permission | |||
sudo chown backuppc: crosrv02.pl | |||
sudo chmod 0640 crosrv01.pl | |||
* Riavviare backuppc | |||
sudo invoke-rc.d backuppc restart | |||
* Abilitare l'utente backuppc ad eseguire sudo senza password | * Abilitare l'utente backuppc ad eseguire sudo senza password | ||
Revision as of 11:22, 13 September 2011
Si usa il metodo Tar locale, eseguito come root tramite sudo.
- Creare il file di configurazione:
sudoedit /etc/backuppc/crosrv02.pl
# Local server backup of / as user backuppc
#
$Conf{XferMethod} = 'tar';
$Conf{TarShareName} = ['/'];
$Conf{TarClientCmd} = '/usr/bin/env LC_ALL=C /usr/bin/sudo $tarPath --one-file-system -c -v -f - -C $shareName'
. ' --totals';
# Please note the use of sudo and --one-file-system
# remove extra shell escapes ($fileList+ etc.) that are
# needed for remote backups but may break local ones
$Conf{TarFullArgs} = '$fileList';
$Conf{TarIncrArgs} = '--newer=$incrDate $fileList';
# Minimum period in days between full and incremental backups:
# 1 Full alla settimana
$Conf{FullPeriod} = 6.97;
# 2 o almeno un incr al giorno
$Conf{IncrPeriod} = 0.24;
# Number of full and incremental backups to keep:
$Conf{FullKeepCnt} = 4;
$Conf{IncrKeepCnt} = 12;
# Level of verbosity in Xfer log files:
$Conf{XferLogLevel} = 1;
# Compression level to use on files. 0 means no compression. See notes
# in main config file before changing after backups have already been done.
$Conf{CompressLevel} = 3;
$Conf{BackupFilesExclude} = ['/proc',
'/sys',
'/dev',
'/cdrom',
'/floppy',
'/mnt',
'/var/spool/squid',
'/lost+found'];
- Aggiungere l'host con il nome:
echo "crosrv02 0 backup@croalliance.com backuppc" | sudo tee /etc/backuppc/hosts > /dev/null
- Sistemare le permission
sudo chown backuppc: crosrv02.pl sudo chmod 0640 crosrv01.pl
- Riavviare backuppc
sudo invoke-rc.d backuppc restart
- Abilitare l'utente backuppc ad eseguire sudo senza password
sudo visudo
... backuppc ALL = NOPASSWD: /bin/tar ...
- Testare un backup locale
sudo -u backuppc /usr/share/backuppc/bin/BackupPC_dump -v -f crosrv02