. I've been using BackupPC since early 2004 and have been pretty happy with" name="description" />
apt-get install backuppc libfile-rsyncp-perl
The installation creates a backuppc user. In order to receive emails sent to that aclearcase/" target="_blank" >ccount consider creating a .forward in ~backuppc (which is /var/lib/backuppc).
The installation process creates a backuppc system account and web login. The password for the weblogin should be changed with htpasswd /etc/backuppc/htpasswd backuppc. The password for the system account is already secure and doesn't need changing.
The BackupPC web interface is now accessible at http://hostname/backuppc.
$Conf = [
{
hourBegin => 8,
hourEnd => 2,
weekDays => [1, 2, 3, 4, 5, 6, 7],
},
];
That's it!
calvin 0 backuppc
Now create a machinename.pl file for each machine that is to be backed up. A generic config file for a Linux box looks like this:
$Conf = 'rsync';
$Conf = ['/sys', '/proc', '/cdrom', '/dvd', '/floppy'];
As a general rule, don't use trailing slashes when specifying directories to exclude.
$Conf = ['.Trash', '/Trash', '/automount', '/Network', '/private/var/automount', '/private/var/run', '/private/var/vm', '/private/var/tmp', '/private/tmp', 'Caches', 'CachedMessages'];
Also, if using tar on Mac OS X (which you probably won't, see below) you need to inform BackupPC that the binary is now in the usual /bin/tar location:
$Conf = '/usr/bin/tar';
Mac OS presents a problem: Many apps (e.g. Quark, Quicken) store important data in resource forks. But the versions of tar and rsync that ship with Mac OS X only support single-stream files (this may change with Mac OS X 10.4 Tiger).
Aside from ignoring resource forks there are two basic ways to deal with them. One is to use a $Conf (seebelow) to make single-stream copies of important files containingresource forks by using BinHex or something similar. A better approachis to make either tar or rsync resource-fork aware. Such a resource-fork aware version would simply map dual-stream files into two single-stream files.
The steps to back resource forks up using tar are:
mv BackupPC_tarExtract BackupPC_tarExtract.origThis patch was written by Craig Barratt himself.
patch -o BackupPC_tarExtract BackupPC_tarExtract.orig BackupPC_tarExtract.diff
chmod 755 BackupPC_tarExtract
$Conf = '/usr/bin/xtar';
Currently (2005-01) rsync is not an option. Andrew Reynhout has created a resource-fork aware rsync. However the Perl rsync emulator in BackupPC does not (yet) work with it. To install the new rsync just place it in /usr/bin, rename the existing rsync (e.g. to rsync_Apple) and make a symlink named rsync to the new version. Fix up the permissions and you're set.
marshmallow:/usr/bin root# ls -alF | grep rsy
lrwxr-xr-x 1 root wheel 23 15 Aug 22:56 rsync@ -> rsync-2.6.2+hfsmode-1.1
-rwxr-xr-x 1 root wheel 625696 15 Aug 22:54 rsync-2.6.2+hfsmode-1.1*
-rwxr-xr-x 1 root wheel 211860 9 Aug 16:08 rsync_Apple*
$Conf = "rsyncd";
$Conf = "BackupPC";
$Conf = "******";
$Conf = "cDrive";
$Conf = ['/winnt/tmp', '/pagefile.sys', '/hiberfil.sys', 'Temporary Internet Files/', '*Cache/', 'Thumbs.db', 'IconCache.db', '~*', 'desktop.ini', 'NTUSER.DAT', 'USRCLASS.DAT', '/RECYCLER', 'Virtual Machines/'];
Alternatively smbclient can be used to access a standard Windows share. Simply replace the rsync config lines with these:
$Conf = 'smb';
$Conf = 'C$';
$Conf = 'BackupPC';
$Conf = '******';
Note that there's a major limitation with this approach: it doesn't let you properly exclude files. You can only specify a single exclude and you don't have full regular expression support. I found that to exclude directory "foobar" I had to use $Conf = ['?foobar']; (foobar by itself or anything I could think of using \ or / didn't work).
The smb approach seem to also require much more RAM than the rsyncmethod. Backing up lots of files with smb has been seen to cause theLinux kernel to start killing random tasks.
If you must use smb you might be better off mounting the remote file system beforehand and then backing up with tar as if it were part of the localhost backup.
The BackupPC FAQ is a good resource. The most important thing it mentions it to try running
sudo -u backuppc /usr/share/backuppc/bin/BackupPC_dump -v -f tomatoin order to view the full output of a verbose backup session on the command line.
Administrators (RIA\Administrators)Also "Backup Operators" don't have permission to read the user foldersinside "Documents and Settings". If you made the BackupPC account aBackup Operator instead of an Administrator and want to back up thosefolders add a Backup Operators (RIA\Backup Operators) entry with thepermissions to Read & Execute, List Folder Contents, Read.
Inherit Allow all except special permissions
CREATOR OWNER
Inherit Allow special permissions
Lorrin (RIA\Lorrin)
Inherit Allow special permissions
Note: this gets set to the CREATOR OWNER. So for C:\
it defaults to Everyone instead of a specific user.
SYSTEM
Inherit Allow all except special permissions
Users (RIA\Users)
Inherit Allow Read & Execute, List Folder Contents, Read, special permissions
The authenticity of host 'calvin (192.168.123.3)' can't be established.Either manually ssh from backuppc's account to the host to be backed upor manually add the hosts info to ~backuppc/.ssh/known_hosts.
RSA key fingerprint is 0b:b2:fa:54:64:05:2c:6a:41:e5:1d:e5:4a:f4:a6:8d.
Are you sure you want to continue connecting (yes/no)?
This can also happen if you're accidentally backing up mounted remotevolumes that are on a slow WAN and take impossibly long to traverse.
You'll also see this if you forget to install rsync on the client. :-)
Check the $Conf setting; it's meant to bethe timeout between signals of life during the backup process but incertain cases acts as a timeout for the entire backup operation. Thedefault is only 7200 seconds (2 hours) and a backup can easily needmore time than that.
Also consider breaking the backup into smaller pieces. That requires two steps in the host's .pl file:
$Conf = ['/', '/var/documents', '/var/media/pictures', '/var/media/music'];
$Conf = [
#
# Do not edit these!
#
'--numeric-ids',
'--perms',
'--owner',
'--group',
'--devices',
'--links',
'--times',
'--block-size=2048',
'--recursive',
#
# If you are using a patched client rsync that supports the
# --checksum-seed option (see http://backuppc.sourceforge.net),
# then uncomment this to enabled rsync checksum cachcing
#
#'--checksum-seed=32761',
#
# Add additional arguments here
#
'--one-file-system',
];