BackupPC Is Not Easy To Setup

Home » CentOS » BackupPC Is Not Easy To Setup
CentOS 12 Comments

I finally got BackupPC working under CentOS-7.1
after several hours of pain. I had been running it for several years under CentOS-6, and probably CentOS-5, but there seem to me to have been several new issues that arise with CentOS-7.

In my experience, the official documentation on this,
, is more or less useless unless you have a very long time to spend. It suffers from the usual Linux disease of having inordinately long explanations of everything with no examples of the actual commands a real person has to give.

The explanation in
(which I only found later) is much better, though it starts with the warning
“This page is no longer maintained, having been abandoned on 2009-09-17”.

I thought I’d write a 1-page note to myself of the steps I took, in preparation for CentOS-8… I have a couple of questions that this raises.

1. Why exactly does BackupPC want to SSH to root?
Is this just a way of running BackupPC as root?

2. The graphical interface seems to be treated as an extra, but what other way is there of accessing BackupPC?
Is there a CLI approach?
If so, where is the list of transfer requests kept?

12 thoughts on - BackupPC Is Not Easy To Setup

  • Timothy Murphy wrote:

    Another small query. I see that BackupPC starts 6 copies of httpd running, but so far only 2 have ever been used. Can this number (6) be changed?

  • To enable access to all of the files on the client.

    It is also possible to run the backup running the rsyncd- daemon on the client.

    Why do you want this? It’s not required to run BackupPC as user root.

    There are some CLI applications available, BackupPC_tarCreate for example to restore file from the command line.

    regards Ulf

  • Ulf Volmer wrote:

    Thanks for your response, which clarifies matters for me.

    I don’t want (or not want) to do this. I was asking the reason for ssh-ing from BackupPC to root. I don’t recall any other application taking this route ?

    I take it then that there is no CLI method of setting up and running BackupPC ?

    Incidentally, I don’t recall ever changing the user and group under which BackupPC is to run when setting up BackupPC under CentOS-6. Maybe this was done automatically during the CentOS installation of this program?
    (I certainly never used suexec explicitly.)

  • 1. It’s just the default, it can easily be configured to start rsync through sudo, you need root privileges to backup all files.

    2. You can do all operations through CLI, all of it is mentioned in the documentation. http://BackupPC.sourceforge.net/faq/BackupPC.html#Step-7:-Talking-to-BackupPC

    3. As mentioned earlier, this is just the default apache config. And can be altered through httpd.conf (though I wouldn’t mess too much with it, the defaults are normally fine).

    -kp

  • kpolberg@olberg.name wrote:

    Thank you for your response. However, I don’t believe this short section gives sufficient information to configure and run BackupPC. Basically, it just gives a way of finding out what is happening while BackupPC is running.
    (Also it finishes by advising you to use the GUI instead.)

    For example, what command would you give to tell BackupPC
    that you want to back up /var/www (to choose a directory at random)?

    I don’t think that is true. The simplest way to configure BackupPC is to run it with user BackupPC, by changing “User apache” to “User BackupPC” in /etc/httpd/conf/httpd.conf .

  • That goes in the config file (typically the per-PC one for this kind of setting, since you won’t back up the same dirs on all clients). http://BackupPC.sourceforge.net/faq/BackupPC.html#Configuration-File

    The options are described in the following sections, that particular setting is described in the well named section:
    http://BackupPC.sourceforge.net/faq/BackupPC.html#What-to-backup-and-when-to-do-it

    Really, the BackupPC docs are pretty good.

  • Sure there is. All of the configuration is stored in text config files. There is a main config file for global options and each host has a config file in it’s own directory.

    Running BackupPC is simply a matter of starting the process. There are various scripts available for manually starting backups and getting stats.

    That said, the GUI is by far the easiest way to add new clients and look for failing backups or other issues.

  • Bowie Bailey wrote:

    Yes, it was pointed out to me that there are instructions in
    <http://BackupPC.sourceforge.net/faq/BackupPC.html>
    in Step-7:-Talking-to-BackupPC. I note that these instructions end by advising the user not to follow them, but to set up the GUI method.

    Incidentally, I’ve been running BackupPC on my CentOS-7 server for about a week now, and I notice that no config file is created in /var/lib/BackupPC/pc/helen, where helen is the host-name. It seems the GUI method stores the config file somewhere else.

  • The GUI config editor is just an alternative to hand editing. It uses the exact same files.

    Keep in mind that the config files are stored separately from the backups. On my system, the backups are under /data/BackupPC and the config files are under /etc/BackupPC.

  • Bowie Bailey wrote:

    You are quite right. The info about directories to backup is in the file
    /etc/BackupPC/pc/helen.pl . I had been looking for a file called config.