Mike Petersen
Network Admin, Technical Writer, Programmer, GNU/Linux Fan, etc.
Skip navigation.
Google
 

Deploying Suse Linux Enterprise Server

Deploying Suse Linux Enterprise Server


Purchase "Deploying Suse Linux Enterprise Server"
at Lulu.com

Deploying BackupPC on SLES

Installing BackupPC

This section will step you through getting BackupPC installed on your Suse Linux Enterprise Server. I will try to give you good defaults to use and explain the various configuration options that you may want to employ in your network. For further information on BackupPC, please visit the projects website at http://backuppc.sourceforge.net/. You can also get an updated version of BackupPC on the projects website. If you do utilize an updated version, some options may not be listed in this guide.

To get started installing, run the following commands (as root):

wget http://www.pcc-services.com/sles/backuppc/BackupPC-3.0.0.tar.gz
tar zxf BackupPC-3.0.0.tar.gz
cd BackupPC-3.0.0
perl configure.pl

Stepping through the Installation - instead of explaining all of the various options, here is the output from the installation script from BackupPC version 3.0.0 - the input I give will be in bold.


Is this a new installation or upgrade for BackupPC?  If this is
an upgrade please tell me the full path of the existing BackupPC
configuration file (eg: /etc/BackupPC/config.pl).  Otherwise, just
hit return.

--> Full path to existing main config.pl []? HIT RETURN

I found the following locations for these programs:

    bzip2        => /usr/bin/bzip2
    cat          => /bin/cat
    df           => /bin/df
    gtar/tar     => /bin/tar
    gzip         => /usr/bin/gzip
    hostname     => /bin/hostname
    nmblookup    => /usr/bin/nmblookup
    par2         =>
    perl         => /usr/bin/perl
    ping         => /bin/ping
    rsync        => /usr/bin/rsync
    sendmail     => /usr/sbin/sendmail
    smbclient    => /usr/bin/smbclient
    split        => /usr/bin/split
    ssh/ssh2     => /usr/bin/ssh

--> Are these paths correct? [y]? HIT RETURN

Please tell me the hostname of the machine that BackupPC will run on.

--> BackupPC will run on host [backuppc]? HIT RETURN

BackupPC should run as a dedicated user with limited privileges.  You
need to create a user.  This user will need read/write permission on
the main data directory and read/execute permission on the install
directory (these directories will be setup shortly).

The primary group for this user should also be chosen carefully.
The data directories and files will have group read permission,
so group members can access backup files.

--> BackupPC should run as user [backuppc]? HIT RETURN

Please specify an install directory for BackupPC.  This is where the
BackupPC scripts, library and documentation will be installed.

--> Install directory (full path) [/usr/local/BackupPC]? /opt/BackupPC

Please specify a data directory for BackupPC.  This is where all the
PC backup data is stored.  This file system needs to be big enough to
accommodate all the PCs you expect to backup (eg: at least several GB
per machine).

--> Data directory (full path) [/data/BackupPC]? /srv/backuppc

BackupPC can compress pool files, providing around a 40% reduction in pool
size (your mileage may vary). Specify the compression level (0 turns
off compression, and 1 to 9 represent good/fastest to best/slowest).
The recommended values are 0 (off) or 3 (reasonable compression and speed).
Increasing the compression level to 5 will use around 20% more cpu time
and give perhaps 2-3% more compression.

--> Compression level [3]? HIT RETURN

BackupPC has a powerful CGI perl interface that runs under Apache.
A single executable needs to be installed in a cgi-bin directory.
This executable needs to run as set-uid backuppc, or
it can be run under mod_perl with Apache running as user backuppc.

Leave this path empty if you don't want to install the CGI interface.

--> CGI bin directory (full path) []? /srv/www/cgi-bin

BackupPC's CGI script needs to display various GIF images that
should be stored where Apache can serve them.  They should be
placed somewher under Apache's DocumentRoot.  BackupPC also
needs to know the URL to access these images.  Example:

    Apache image directory:  /usr/local/apache/htdocs/BackupPC
    URL for image directory: /BackupPC

The URL for the image directory should start with a slash.

--> Apache image directory (full path) []? /srv/www/htdocs/BackupPC
--> URL for image directory (omit http://host; starts with '/') []? /BackupPC

Ok, we're about to:

  - install the binaries, lib and docs in /opt/BackupPC,
  - create the data directory /srv/backuppc,
  - create/update the config.pl file /etc/BackupPC/config.pl,
  - optionally install the cgi-bin interface.

--> Do you want to continue? [y]? HIT RETURN
Created /opt/BackupPC/bin
Created /opt/BackupPC/doc
Created /opt/BackupPC/lib/BackupPC/CGI
Created /opt/BackupPC/lib/BackupPC/Config
Created /opt/BackupPC/lib/BackupPC/Lang
Created /opt/BackupPC/lib/BackupPC/Storage
Created /opt/BackupPC/lib/BackupPC/Xfer
Created /opt/BackupPC/lib/BackupPC/Zip
Created /srv/www/htdocs/BackupPC
Created /srv/backuppc
Created /srv/backuppc/pool
Created /srv/backuppc/cpool
Created /srv/backuppc/pc
Created /srv/backuppc/trash
Created /etc/BackupPC
Created /var/log/BackupPC
Installing binaries in /opt/BackupPC/bin
Installing library in /opt/BackupPC/lib
Installing images in /srv/www/htdocs/BackupPC
Making init.d scripts
Installing docs in /opt/BackupPC/doc
Installing config.pl and hosts in /etc/BackupPC

Adjusting Some BackupPC Parameters

Now that backuppc is now installed on your server, you will probably want to adjust a few parameters that are found in the /etc/BackupPC/config.pl file. Note that all of these options can now be adjusted using the "Edit Config" link on the Web Interface's Status Page (new in BackupPC version 3.0.0).

$Conf{WakeupSchedule} - line 118 - allows you to specify when BackupPC will check to see if it should start backing up your servers.

$Conf{FullKeepCnt} - line 440 - allows you to specify how many different backups to keep. If you have enough space I suggest you change this to [ 4,0,4,0,0,2 ] to ensure you have older versions of your files to go back to.

$Conf{EmailAdminUserName} - line 1726 - set it to an email account that you regularly check as the backuppc program will email info reguarding problems to this account (as long as the server is running)

$Conf{EmailUserDestDomain} - line 1737 - if you want your backuppc users to receive emails about problems set this to the correct domain.

$Conf{CgiAdminUsers} - line 1857 - set this to the users that you want to have full control over all of the clients you backup.

Getting BackupPC to Start Upon Startup

To get BackupPC to run upon startup you need to adjust a few things. First you must download an updated startup script to use as the one included with BackupPC doesn't really work with Suse Linux. To do this follow the following commands:

wget http://www.pcc-services.com/sles/backuppc/backuppc
install -m 0755 backuppc /etc/init.d/

Note: I still need to fine tune this script as it won't "restart" properly, but it does "stop" and "start" properly. Once I have more time I will look into this.

Now to get BackupPC to run at computer startup run the following command:

chkconfig -a backuppc

Once you start backuppc, you should be able to access the web interface through hostname/cgi-bin/BackupPC_Admin. It should ask for a username and password, if not try restarting the server and trying again. Later I will show you how to allow your Administrators easier access, as well as add a "legal" page to try to avoid unauthorized access.

Next


Purchase "Deploying Suse Linux Enterprise Server"
at Lulu.com

Website Powered by SuSE Linux Enterprise Server.

Valid XHTML 1.0!

Valid CSS!

© Website Copyright 2008 - Mike Petersen
Verbatim distribution permitted