Home > BackupPC, Linux, openSuse > Installing BackupPC on openSuse 13.1

Installing BackupPC on openSuse 13.1

I was trying to install BackupPC on my fresh openSuse 13.1 install. There was no package for openSuse so I used the documentation from the original site.


The missing prerequsite for perl is File::RsyncP which you can install from repository in version 0.43, or use the newer one from Sourceforge in version 0.68. I like being on the bleeding edge (0.43 is from 2003, and 0.68 is from 2006) and actually BackupPC states that it needs at least 0.68.

wget http://downloads.sourceforge.net/project/perlrsync/perlrsync/0.68/File-RsyncP-0.68.tar.gz
tar -xvf File-RsyncP-0.68.tar.gz
cd File-RsyncP-0.68
perl Makefile.PL

Error 1:
Make is missing so I have to install that also.

Fix 1:
zypper install make

Continuing the installation of File::RsyncP.

Error 2:
GCC is missing so I have to install that also.

Fix 2:
zypper install gcc

Continuing the installation of File::RsyncP.
make install

There were some warnings, but the tests passed OK, so I think this will work just fine.

Creating a dedicated user and group

For security reasons a dedicated user and group should be used for running BackupPc.

useradd -d /home/backuppc -c 'BackupPC user' -U -r -M backuppc
mkdir /home/backuppc
chown -R backuppc:backuppc /home/backuppc

Getting and installing BackupPC 3.3.0

The source can be downloaded from Sourceforge and the installation is trivial.

wget http://downloads.sourceforge.net/project/backuppc/backuppc/3.3.0/BackupPC-3.3.0.tar.gz
tar -xvf BackupPC-3.3.0.tar.gz
cd BackupPC-3.3.0
perl configure.pl

Now is the time to answer some questions:

  1. Full path to existing main config.pl – leave empty
  2. Are these paths correct? – yes
  3. BackupPC will run on host [your_host_name]? – acknowledge the default
  4. BackupPC should run as user [backuppc]? – use the default
  5. Install directory (full path) – /opt/BackupPC
  6. Data directory (full path) – /home/backuppc/data
  7. Compression level [3]? – user default
  8. CGI bin directory (full path) – /srv/www/cgi-bin
  9. Apache image directory (full path) – /srv/www/htdocs/BackupPC
  10. URL for image directory (omit http://host; starts with ‘/’) – /BackupPC
  11. Do you want to continue? – yes

Now that BackupPC is installed, in needs to be configured. So open /etc/BackupPC/config.pl and configure it:

$Conf{WakeupSchedule} = [20];
$Conf{FullKeepCnt} = [4, 0, 4];
$Conf{IncrLevels} = [1, 2, 3, 4, 5, 6];
$Conf{CgiAdminUsers} = 'your_username';

Run every day at 20:00, have 5 months of full backups (4 * 1 week + 4 * 1 month), create 6 incremental backups between full backups (every day between the weekly full backup), and setup a user as admin.

Acording to this article, the default init script is not good so another one should be used. As that script is also broken, you can use the following:

# /etc/init.d/backuppc
# Provides: backuppc
# Required-Start: $local_fs $remote_fs $network
# X-UnitedLinux-Should-Start:
# Required-Stop: $local_fs $remote_fs $network
# X-UnitedLinux-Should-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: BackupPC - High End Archive Server
# Description: Start the BackupPC daemon


set -e


test -x $BINDIR/$DAEMON || exit 0

case "$1" in
echo -n "Starting $NAME: "
startproc -p $LOGDIR/BackupPC.pid -u $USER $BINDIR/$DAEMON -d
echo "ok."
echo -n "Stopping $NAME: "
killproc -TERM -p $LOGDIR/BackupPC.pid $BINDIR/$DAEMON
echo "ok."
$0 stop
$0 start
echo "Reloading $NAME configuration files"
killproc -SIGHUP -p $LOGDIR/BackupPC.pid $BINDIR/$DAEMON
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
exit 1

exit 0

After that register the service with this command:

install -m 0755 backuppc /etc/init.d/

Go, go, go…

Run the service with:

service backuppc start

And that’s it. Now, to configure clients and Nginx you will have to wait for the next article.

  1. No comments yet.
  1. 31/12/2013 at 11:34

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: