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, http://backuppc.sourceforge.net/faq/BackupPC.html, 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 https://wiki.centos.org/HowTos/BackupPC (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?
Timothy Murphy wrote:
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.
- Why exactly does backuppc want to ssh to root?
Is this just a way of running BackupPC as root?
- 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?
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?
On 09/13/2015 03:48 PM, Timothy Murphy wrote:
Timothy Murphy wrote:
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.
- Why exactly does backuppc want to ssh to root?
Is this just a way of running BackupPC as root?
- 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?
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?
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-BackupP...
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:
- 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?
- 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-BackupP...
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)?
- 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).
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 .
On 09/15/2015 10:58 AM, Timothy Murphy wrote:
kpolberg@olberg.name wrote:
- 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?
- 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-BackupP...
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)?
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...
Really, the backuppc docs are pretty good.
On 09/13/2015 01:35 PM, Timothy Murphy wrote:
I have a couple of questions that this raises.
- Why exactly does backuppc want to ssh to root?
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.
Is this just a way of running BackupPC as root?
Why do you want this? It's not required to run backuppc as user root.
- The graphical interface seems to be treated as an extra,
but what other way is there of accessing BackupPC? Is there a CLI approach?
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 have a couple of questions that this raises.
- Why exactly does backuppc want to ssh to root?
To enable access to all of the files on the client.
Is this just a way of running BackupPC as root?
Why do you want this? It's not required to run backuppc as user root.
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 ?
- The graphical interface seems to be treated as an extra,
but what other way is there of accessing BackupPC? Is there a CLI approach?
There are some CLI applications available, BackupPC_tarCreate for example to restore file from the command line.
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.)
On 9/13/2015 7:58 AM, Timothy Murphy wrote:
- Why exactly does backuppc want to ssh to root?
To enable access to all of the files on the client.
Is this just a way of running BackupPC as root?
Why do you want this? It's not required to run backuppc as user root.
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 ?
its using ssh to run rsync on the backup target... it uses root so that rsync can access all files.
On 9/13/2015 10:58 AM, Timothy Murphy wrote:
I take it then that there is no CLI method of setting up and running BackupPC ?
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:
On 9/13/2015 10:58 AM, Timothy Murphy wrote:
I take it then that there is no CLI method of setting up and running BackupPC ?
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.
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.
On 9/18/2015 8:39 AM, Timothy Murphy wrote:
Bowie Bailey wrote:
On 9/13/2015 10:58 AM, Timothy Murphy wrote:
I take it then that there is no CLI method of setting up and running BackupPC ?
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.
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:
On 9/18/2015 8:39 AM, Timothy Murphy wrote:
Incidentally, I've been running BackupPC on my CentOS-7 server
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.
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.