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 diskit's easiest to do it before installing BackupPC. I created an LVMgroup/volume mounted at that location just for BackupPC data.Installation
BackupPC requires a version of Apache to beinstalled. (Other web servers may also work, but you will be on yourown.) If you don't have Apache installed then Apache 1.3 will beinstalled for you. If you want a different version of Apache theninstall 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 seemlike that might need changing (e.g. backup method) are often bestconfigured on a per-client basis in separate files. I changed thefollowing:- $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 settingspecifies for how many backups in a row a machine has be available tobe 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'soutage 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'];上一页 下一页






