The duty to backup - Yet another BackupPC tutorial![]() Not long ago my backup situation looked like this: Important data had been mirrored across my local net, actual project`s data had been manually rolled out on DVD. Mirroring worked fine with Unison. Outcome was a historically grown chaos. Here we want to fight it with help of open source software BackupPC. When thinking about the design of the backup process and singling out eligible software it became obvious that i didn`t want a homebrew scripting solution. I wanted a clear system to backup a network with different operating systems (MacOS X, Windows, Linux). My search led me to BackupPC.
These notes don`t want to be more than a mnemonic rhyme. Maybe you'll find some helpful details don't forget to read the manual. The links at the bottom of this page may lead you through that topic. Pathnames in this article are related to Gentoo Linux, you should find them on other linux flavours, too. BackupPC basically a webserver is not needed, the webfrontend is the recommended way to administer the server. (screenshots). For that you need a running webserver. (e.g. Apache) ApacheBackupPC is written in perl. The recommended configuration uses the module mod_perl. Activate it /etc/conf.d/apache2:
http://localhost/perl-status shows you if and how mod_perl had been installed. In my scenario apache also serves multiple local domains and is set up for name-based virtual hosts (vhosts). The backup server is accessible via localhost as default vhost. create /etc/apache2/vhosts.d/backuppc.include with
/etc/apache2/vhosts.d/00_default_vhost.conf: After the entry
the new file has to be included:
Set up users for the web frontend:
For use with BackupPC Apache needs to run with backuppc's rights.
/etc/BackupPC/hosts:
Apache runs as backuppc so trouble may be caused with existing local websites because of missing permissions. For that you can add backuppc to the apache group
and adjust group permissions of affected paths. Another maybe cleaner approach is to set up another web server (e.g. lighttp), start two instances of apache, second one in a virtual machine or host a server on a separate pc. BackupPCFor the backup process to run as root with full file permissions, extent backuppc's permissions by
How to backup Every pc gets his own configuration file: Adjusting the backup command for localhost:
Enabling the root access via Mounting of paths that usually are unmounted. If databases should be backed up, here's the place for any commands to dump your database data to a directory backed up by BackupPC.
What to backup
defines which paths to backup with exemptions,
times of the day when no backup should run. SSH tunnelThe choosen rsync method works flawlessly over a ssl tunnel. i.d. BackupPC does roughly the same as a normal user who logs into a remote client using ssh user@hostname. For the automatic way it's indispensable that user backuppc is able to log in without typing any password. Procedure: For each user in the backup network you'll have to create a key-pair without entering any password:
The public key id_rsa.pub from user backuppc needs to be copied into ~/.ssh/authorized_keys from userA.
In this example of ~/.ssh/authorized_keys an IP filter is set for more security.
on the server userA's public key has to be added
To make the hosts known it's easier to connect via command line - see the testcommand below. To validate the computer's fingerprint to which we want to connect:
at the prompt:
Example known_hosts
The home directory of backuppc must exist.
you open the tunnel. Is that working BackupPC is told to do it the same way.
WOL (wake on lan)PCs which go into sleep mode after a while are woken up by
where /etc/BackupPC/pc/wakeup.sh looks like:
Mac OSX boxes: system preferences - energy saver - "Wake for Ethernet network administrator access" activate this. Mac Laptops with Snow Leopard (>2009) can be woken up, if the power supply is connected and the lid stays open. Links:Comments
Display comments as
(Linear | Threaded)
No comments
Add Comment
|
QuicksearchSpracheTopics |