Overview
This page covers installing and configuring BackupPC
. I've been using BackupPC since early 2004 and have been pretty happy with it.
Overview
This page covers installing and configuring BackupPC
. I've been using BackupPC since early 2004 and have been pretty happy with it.
Preparation
Backups will be stored under /var/lib/backuppc. If you want to have that correspond to a specific partition or disk it's easiest to do it before installing BackupPC. I created an LVM group/volume mounted at that location just for BackupPC data.
Installation
BackupPC requires a version of Apache to be installed. (Other web servers may also work, but you will be on your own.) If you don't have Apache installed then Apache 1.3 will be installed for you. If you want a different version of Apache then install that before installing BackupPC.apt-get install backuppc libfile-rsyncp-perl
The installation creates a backuppc user. In order to receive emails sent to that account consider creating a .forward in ~backuppc (which is /var/lib/backuppc).
Configuring Apache
If Apache just got freshly installed, consider updating /var/www/index.html.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.
Configuring BackupPC
The main config file is /etc/backuppc/config.pl. Very little needs to be changed in this file! Most settings that seem like that might need changing (e.g. backup method) are often best configured on a per-client basis in separate files. I changed the following:
- $Conf = 1;
- Changed to $Conf = [1, 0, 1]; so as to keep a full backup that was approximately one month old in addition to the current one.
- $Conf = 7;
- This setting specifies for how many backups in a row a machine has be available to be considered an "always-on" machine. I reduced it to 2. I occasionally (but rarely) turn my machine off at night and don't want one night's outage to cause 7 days of mid-day instead of night-time backups.
- $Conf
- I extend the Blackout to be all hours of every day of the week except for 2:00am to 8:00am.
$Conf = [
{
hourBegin => 8,
hourEnd => 2,
weekDays => [1, 2, 3, 4, 5, 6, 7],
},
];
That's it!
Specifying Clients
First add each machine to be backed up to /etc/backuppc/hosts. All my entries look like this: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.
Mac OS X
A good set of excludes for Macs are$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 (see below) to make single-stream copies of important files containing resource forks by using BinHex or something similar. A better approach is 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:
- Install Helios xtar
on the Mac(s) to be backed up.
- If you're using BackupPC prior to 2.1.1 then on the BackupPC server, in
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




