BackupPC

From ArchWiki
Revision as of 23:04, 12 March 2010 by Aaahaaap (Talk | contribs) (Installation)

Jump to: navigation, search

BackupPC is a high-performance, enterprise-grade system for backing up Unix, Linux, WinXX, and MacOSX PCs, desktops and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain.

Given the ever decreasing cost of disks and raid systems, it is now practical and cost effective to backup a large number of machines onto a server's local disk or network storage. For some sites this might be the complete backup solution. For other sites additional permanent archives could be created by periodically backing up the server to tape.

Installation

Prerequisites

Packages

The following packages are needed if you want to:

Create the the backuppc user

useradd backuppc --uid 91 -g nobody --home /home/backuppc --create-home
Note: When installing BackupPC from AUR this isn't necessary since it is handled by the PKGBUILD.

Install the package

To build BackupPC from AUR run as a regular user:

wget http://aur.archlinux.org/packages/backuppc/backuppc.tar.gz
tar -zxf backuppc.tar.gz
cd backuppc
makepkg

When done run as root:

pacman -U backuppc-version-arch-pkg.tar.gz
chown -R backuppc:nobody /var/log/BackupPC

Running BackupPC

Start BackupPC

To manually start BackupPC issue this command.

/etc/rc.d/backuppc start

Make BackupPC run at startup

To make BackupPC load at startup edit /etc/rc.conf and add it to DAEMONS.

nano /etc/rc.conf
DAEMONS=(... backuppc ...)

Apache Configuration

BackupPC has a web interface that allows you to control it. It required Apache and mod_perl.

Install Apache and mod_perl

pacman -S apache
pacman -S mod_perl

Edit Apache configuration

You can edit the Apache configuration file to change the port number, etc.

nano /etc/httpd/conf/backuppc-httpd.conf

Edit /etc/BackupPC/config.pl. Set administrator name

$Conf{CgiAdminUsers} = 'admin'; 

Next, we need to add a users file. Edit /etc/httpd/conf/backuppc-httpd.conf

AuthName "Backup Admin"
AuthType Basic
AuthUserFile /etc/BackupPC/BackupPC.users
Require valid-user

Set admin password

htpasswd -c /etc/BackupPC/BackupPC.users admin

Add following lines if you already use apache before

LockFile "/var/lock/backuppc-httpd.lock"
PidFile "/var/run/httpd/backuppc-httpd.pid"

Starting Apache manually

/etc/rc.d/backuppc-httpd start

Starting Apache on boot

Add the backuppc-http daemon to rc.conf

nano /etc/rc.conf
DAEMONS=(... backuppc-httpd ...)

Browse to http://localhost:81/cgi-bin/BackupPC_Admin

Resources