个人工具

“UbuntuHelp:BackupPC”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第2行: 第2行:
 
{{Languages|UbuntuHelp:BackupPC}}
 
{{Languages|UbuntuHelp:BackupPC}}
 
== [[UbuntuHelp:BackupPC|BackupPC]] ==
 
== [[UbuntuHelp:BackupPC|BackupPC]] ==
[[UbuntuHelp:BackupPC|BackupPC]] is a great backup program for an Ubuntu server. However, it doesn’t work “out of the box” due to Ubuntu’s lack of a root account. The following describes how to make [[UbuntuHelp:BackupPC|BackupPC]] work with Ubuntu's sudo implementation. By adding sudo to the TAR commands in /etc/backuppc/config.pl and adding backuppc to the sudoers list, you’re able to perform both backups and restores directly from the web-based interface.
+
[[UbuntuHelp:BackupPC|BackupPC]] is a great backup program for an Ubuntu server. However, backing up Ubuntu client machines doesn’t work “out of the box” due to Ubuntu’s lack of a root account. The following describes how to make [[UbuntuHelp:BackupPC|BackupPC]] work with Ubuntu's sudo implementation. By adding sudo to the TAR commands in /etc/backuppc/config.pl and adding backuppc to the sudoers list, you’re able to perform both backups and restores directly from the web-based interface.
 
=== Modify /etc/backuppc/config.pl ===
 
=== Modify /etc/backuppc/config.pl ===
*Run “sudo vim /etc/backuppc/config.pl”
+
*Run “sudo gedit /etc/backuppc/config.pl”
 
*Add sudo to the TAR <code><nowiki>Client</nowiki></code> and <code><nowiki>ClientRestore</nowiki></code> commands
 
*Add sudo to the TAR <code><nowiki>Client</nowiki></code> and <code><nowiki>ClientRestore</nowiki></code> commands
 
*Change <code><nowiki>$Conf{TarClientCmd} </nowiki></code>and <code><nowiki>$Conf{TarClientRestoreCmd} </nowiki></code>to read
 
*Change <code><nowiki>$Conf{TarClientCmd} </nowiki></code>and <code><nowiki>$Conf{TarClientRestoreCmd} </nowiki></code>to read

2008年4月23日 (三) 10:28的版本

BackupPC

BackupPC is a great backup program for an Ubuntu server. However, backing up Ubuntu client machines doesn’t work “out of the box” due to Ubuntu’s lack of a root account. The following describes how to make BackupPC work with Ubuntu's sudo implementation. By adding sudo to the TAR commands in /etc/backuppc/config.pl and adding backuppc to the sudoers list, you’re able to perform both backups and restores directly from the web-based interface.

Modify /etc/backuppc/config.pl

  • Run “sudo gedit /etc/backuppc/config.pl”
  • Add sudo to the TAR Client and ClientRestore commands
  • Change $Conf{TarClientCmd} and $Conf{TarClientRestoreCmd} to read
$Conf{TarClientCmd} = ‘sudo $tarPath -c -v -f - -C $shareName’
. ‘ –totals’;
$Conf{TarClientRestoreCmd} = ‘sudo $tarPath -x -p –numeric-owner –same-owner’
. ‘ -v -f - -C $shareName’;
  • Change $Conf{BackupFilesExclude} (these seem to all be temp files that you don’t really need to backup) to read
$Conf{BackupFilesExclude} = [’/proc’, ‘/dev’, ‘/tmp’, ‘/mnt’, ‘/media’, ‘/sys’, ‘/lost+found’, ‘/usr/src’, ‘/var/lib’, ‘/var/tmp’, ‘/var/cache’, ‘/var/spool’, ‘/var/run’, ‘/var/lock’, ‘/var/games’, ‘/home/*/.Trash’, ‘/home/*/.mozilla/*/*/Cache’, ‘/home/*/.mozilla/*/*/Cache.Trash’];

Add backuppc to the sudoers list

  • Run “sudo visudo”
  • At the bottom of the file add
# Allow backuppc to run tar without a password
backuppc ALL=NOPASSWD: /bin/tar

alternatives

For other ways of backing up some or all of your system, see BackupYourSystem .