Intro

Upgrading BackupPC is a bit tricky as it's not packaged for an easy install. The scripts are however pretty self-explanatory most of the time.

This guide describes a common upgrade on a CentOS 5-server along with the errors I encountered and their fix.

The guide should be usable on later CentOS-versions as well. Particular gotchas' are described inline as they appear when installing on CentOS 7

 

Legends

BPC = BackupPC

 

Guide

  1. Download the following files and save them in eg /root/Downloads.
    BackupPC-4.2.1.tar.gz
    https://github.com/backuppc/backuppc/releases/tag/4.2.1

    BackupPC-XS-0.57.tar
    https://metacpan.org/pod/BackupPC::XS or
    https://github.com/backuppc/backuppc-xs/releases

    rsync-bpc-master.zip
    https://github.com/backuppc/rsync-bpc
    C
    lick Clone or download, then choose Download ZIP.

  2. Untar and unzip the archives.
    # cd /root/Downloads
    # gunzip BackupPC-4.2.1.tar.gz
    # tar -xvf BackupPC-4.2.1.tar
    # tar -xvf BackupPC-XS-0.57.tar
    # unzip rsync-bpc-master.zip


  3. Install BackupPC-XS using either of the alternative below. It's a personal choice.
    Archive alternative:
    # cd BackupPC-XS-0.57
    # perl Makefile.PL
    # make
    # make test
    # make install
    Cpan alternative:
    # perl -MCPAN -e shell
    # install BackupPC::XS
    Cpanm alterntive:
    If you don't already have cpanm installed, you need to install it first, then the BackupPC::XS module.
    # cpan App::cpanminus
    # cpanm BackupPC::XS

    On my CentOS 7-server I didn't have cpan installed. Run the following commands to install cpan.
    Before installing cpan, you might also want to make sure all needed devtools are installed.
    # yum groupinstall "Development Tools"
    # yum install cpan
    # cpan App::cpanminus
    Choose to run the wizard automatically. The default choices should be okay to use.

  4. Install rsync-bpc.
    # cd /root/Downloads/rsync-bpc-master
    # ./configure.sh
    # make
    # make install

    If you get this error:
    lib/sysacls.c:2761:2: error: #error No ACL functions defined for this platform!
    #error No ACL functions defined for this platform!
    ^
    make: *** [lib/sysacls.o] Error 1
    Install libacl-devel:
    # yum install libacl-devel
    Then run the install again:
    # ./configure.sh
    # make
    # make install


  5. Install BackupPC-4.2.1.
    # cd /root/Downloads/BackupPC-4.2.1
    # ./configure.pl
    Found /etc/BackupPC/config.pl, so this is an upgrade of an existing BackupPC installation. We will verify some existing information, but you will probably not need to make any changes - just hit ENTER to each question.
    I found the following locations for these programs: bzip2 => /usr/bin/bzip2
    cat => /usr/bin/cat
    df => /usr/bin/df
    gtar/tar => /usr/bin/gtar
    gzip => /usr/bin/gzip
    hostname => /usr/bin/hostname
    nmblookup => /usr/bin/nmblookup
    par2 =>
    perl => /usr/bin/perl
    ping => /bin/ping
    ping6 => /usr/sbin/ping6
    rrdtool =>
    rsync => /usr/bin/rsync
    rsync_bpc => /usr/local/bin/rsync_bpc
    sendmail => /usr/sbin/sendmail
    smbclient => /usr/bin/smbclient
    split => /usr/bin/split
    ssh/ssh2 => /usr/bin/ssh
    --> Are these paths correct? [y]?
    If all the needed programs are there and correctly pointed to, press Enter to continue the install.

    For me par2 was missing. Install it as below.
    # yum install par2cmdline
    Rrdtool was missing too, so run this too.
    # yum install rrdtool
    Or combine them:
    # yum install par2cmdline rrdtool

    If rrdtool isn't found for your distro, as it was for one of my ancient CentOS 5-servers, try rpm.pbone.net and search for it (make sure to only choose your particular distro!). Download it when found, then install it.
    # rpm -Uvh rrdtool-1.3.9-1.4.i386.rpm

    Run the installer again and confirm the paths are correct and that no programs are missing.
    # ./configure.pl

    If you get this error after continuing the install.
    BackupPC needs the package version. Please install version before installing BackupPC.
    Install the missing version module. Lots of stuff will download and install.
    # cpanm version

    Run the BPC-install yet again.
    # ./configure.pl

    When the install is completed, restart the httpd daemon as per instruction.
    service httpd restart
    If this was an upgrade, restart the backuppc daemon as well, or the server will only load the previous now stale version.
    service backuppc restart

    If you get the below error after restarting the backuppc daemon:
    Starting BackupPC: Invalid version format (trailing decimal) at /usr/share/BackupPC/bin/BackupPC line 125
    [FAILED]
    Edit /usr/share/BackupPC/bin/BackupPC.
    Edit /usr/share/BackupPC/bin/BackupPC and change the following line:
    # nano /usr/share/BackupPC/bin/BackupPC
    $version = $1 if ( $output =~ /rsync_bpc\s+version\s+([\d.]+)(beta\d+)?\s+protocol/ );
    to
    $version = $1 if ( $output =~ /rsync_bpc\s+version\s+([\d.]+?)(\.beta\d+)?\s+protocol/ );
    Per the BackupPC-users mailing list, this change might already have been commited for the next BPC release. YMMV as usual.

    Save your edit and rerun.
    service backuppc restart
    BPC daemon should now start correctly.

  6. Check the BPC gui as confirmation.

 

Sources

http://backuppc.sourceforge.net/

http://backuppc.sourceforge.net/BackupPC-4.2.1.html

https://github.com/backuppc/backuppc/releases/tag/4.2.1

https://github.com/backuppc/backuppc-xs/releases

https://metacpan.org/pod/BackupPC::XS

https://github.com/backuppc/rsync-bpc

https://github.com/backuppc/rsync-bpc/archive/master.zip

https://sourceforge.net/p/backuppc/mailman/message/36387926/

https://sourceforge.net/p/backuppc/mailman/message/36447582/

https://github.com/backuppc/backuppc/commit/11e025b8df164634617bbff920bf2410638acfca

 

 

 

Stop Spam Harvesters, Join Project Honey Pot

 

Get a free SSL certificate!

 

The leading nonprofit defending digital privacy, free speech, and innovation.

 

The Linux Foundation provides a neutral, trusted hub for developers and organizations to code, manage, and scale open technology projects and ecosystems.

 

Kubuntu is an operating system built by a worldwide community of developers, testers, supporters and translators.

 

 43ef5c89 CanonicalUbuntudarktext