Hi community
Is there some plans to update the Backup module to the new version 4,3,1.
Or are there some who can tell how to do it, after install?
Sorry, don’t understand the question. Can you clarify what do you mean?
You have also a copr rpm
https://copr.fedorainfracloud.org/coprs/hobbes1069/BackupPC/
I did not tested yet, it seems that an upgrade is possible even if some users customisation could make some faillures
Hi Stéphane
I’m happy to test it, now it’s just that I’m very new to a linux. Can you please help me how to do it.
Thanks for the help
Michael
vim /etc/yum.repos.d/backuppc.repo
drop the content of https://copr.fedorainfracloud.org/coprs/hobbes1069/BackupPC/repo/epel-7/hobbes1069-BackupPC-epel-7.repo
[copr:copr.fedorainfracloud.org:hobbes1069:BackupPC]
name=Copr repo for BackupPC owned by hobbes1069
baseurl=https://copr-be.cloud.fedoraproject.org/results/hobbes1069/BackupPC/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/hobbes1069/BackupPC/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
then
yum install BackupPC
You should probably try it with a VM
ok, my first try is with a new install nethserver. and then I do as you write.
it was a partial success
everything seemed to be going well, however, the day I tried to access the backup site (https: //xxx.xxx.xxx.27/BackupPC. I got this message:
Forbidden
You do not have permission to access / BackupPC on this server.
You could do
signal-event nethserver-backuppc-update
And check if it solves your issue
Else you could go to the apache log and check what is the error
From memory /var/log/httpd/error*
Well it is not compatible like this, the version of epel takes care to set a setuid on particular files, this is not the case of the version 4.
EDIT : for the record this is what we should do, but I really do not like the idea to install gcc on a server
install the repo of backuppc
vim /etc/yum.repos.d/backuppc.repo
and drop this content
[copr:copr.fedorainfracloud.org:hobbes1069:BackupPC]
name=Copr repo for BackupPC owned by hobbes1069
baseurl=https://copr-be.cloud.fedoraproject.org/results/hobbes1069/BackupPC/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/hobbes1069/BackupPC/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
yum install gcc nethserver-BackupPC -y
mv /usr/share/BackupPC/sbin/BackupPC_Admin /usr/share/BackupPC/sbin/BackupPC_Admin.pl
vim BackupPC_Admin.c
and drop this content
#include <unistd.h>
#ifndef REAL_PATH
#define REAL_PATH "/usr/share/BackupPC/sbin/BackupPC_Admin.pl"
#endif
int main(ac, av)
char **av;
{
execv(REAL_PATH, av);
return 0;
}
then you need to do these commands
gcc -o BackupPC_Admin BackupPC_Admin.c
cp BackupPC_Admin /usr/share/BackupPC/sbin/
chown backuppc:apache /usr/share/BackupPC/sbin/BackupPC_Admin
chmod u+s /usr/share/BackupPC/sbin/BackupPC_Admin
it doesn’t survive to an upgrade of BackupPC
two possible way:
- I could fork the copr package and this during the build of the rpm
- I could ask to the rpm builder why he did not incorporate it inside like the V3 does
Hello again
Now i have done this test:
- Install a new web server
- Update it to the latest version.
- Run the script you have for me.
- Changing the user in httpd.conf to “backuppc”, unless I change it, the site could not display. and now I get the same as last time:You do not have permission to access / BackupPC on this server.
- I then try your command: signal-event nethserver-backuppc-update, with this result.
.
About httpd / error log, I have to give up.
PS: how to attach / upload a file to you
Hi
Now i have test it, and the success was not so good.
First place I had problems was:
Here I have to create the folder “BackupPC/sbin/BackupPC_Admin”
The other place was:

Here i got this error
And after this i got this message when I try to access the website: Not Found
The requested URL /BackupPC was not found on this server.
I think it is
signal-event nethserver-BackupPC-update
You can press tab to autocomplete but we need to find a new way to make it perpetual
I have tests again, with the same result.
Although I did use the command:signal-event nethserver-BackupPC-update
Ok lets see another solution
I’m ready to test
I was pointed here by another user so just to get everyone one the same page…
I run the COPR (as well as manage BackupPC for Fedora and Fedora EPEL).
It looks like the nethserver version still requires quite a bit of post install work. I would recommend using my copr as it builds the required C program for suid (also needed for SELinux) and installs it.
My only concern is cleanup after switching sources. You’ll need to make sure that the CgiDir is set correctly:
/etc/config.pl (It should point to the libexec version.)
$Conf{TopDir} = '/var/lib/BackupPC/';
$Conf{ConfDir} = '/etc/BackupPC/';
$Conf{LogDir} = '/var/log/BackupPC';
$Conf{RunDir} = '/var/run/BackupPC';
$Conf{InstallDir} = '/usr/share/BackupPC';
$Conf{CgiDir} = '/usr/libexec/BackupPC'; <---- Here
Thank richard, I am the bad guy who ping you, we will try to understand why it doesn’t work with rpm I maintain for v3
@hobbes1069 I got it, thank for the guidance, the suid is well created, but not exactly in the same path I need, so I need to adapt my template : /etc/e-smith/templates/etc/httpd/conf.d/BackupPC.conf/10base
ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin
ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin
to
ScriptAlias /BackupPC /usr/libexec/BackupPC/BackupPC_Admin
ScriptAlias /backuppc /usr/libexec/BackupPC/BackupPC_Admin
question can we safely make a migration to V4 from V3 or your warning is still true that the configurations are not compatibles
Yes, I chose to use /usr/libexec as it is the appropriate place to put binaries that are designed to be called by other programs (instead of directly by the user/admin).
So yes, there are a number of changes that may be needed depending on how your original BackupPC was setup. A good place to start is Fedora Package Sources and all the RPMs are generated from its content and I essentially use the same source for the COPR builds.
https://src.fedoraproject.org/rpms/BackupPC/tree/master
Of particular importance would be the Apache setup since it could vary quite a bit from other sources or manual setups.
https://src.fedoraproject.org/rpms/BackupPC/blob/master/f/BackupPC.htaccess
The spec file might also be useful for those than know how to read them, although it’s pretty straight forward.
https://src.fedoraproject.org/rpms/BackupPC/blob/master/f/BackupPC.spec
The C wrapper I created for suid/SELinux can be inspected here:
https://src.fedoraproject.org/rpms/BackupPC/blob/master/f/BackupPC_Admin.c
Also, for historical reasons the systemD service file is all lower case. If that’s not true for the existing install then you could end up with two unit files trying to load the same service.
Thanks,
Richard
Hi Stéphane
Will there be a test version?
Michael
Yes, not right now, but you could install my rpm with the rpm of copr, then adjust the path in the template and issue signal-event nethserver-BackupPC-update
It should work