1. Install BackupPC and prerequsities
#yum install epel-release
#yum install backuppc nfs-utils nfs-utils-lib bzip2
#systemctl restart backuppc.service
2. Set permissions
#cd /usr/share/BackupPC/
#chown backuppc:apache sbin/*
#cd /usr/share/BackupPC/sbin
#chmod u+s BackupPC_Admin
#usermod -s /bin/bash backuppc
3. Set firewall rule for HTTP port.
#firewall-cmd –zone=public –add-port=80/tcp –permanent
#firewall-cmd –reload
4. Edit BackupPC config
#vi /etc/BackupPC/config.pl
Edit
$Conf{CgiAdminUserGroup} = ”;
$Conf{CgiAdminUsers} = ”;
TO
$Conf{CgiAdminUserGroup} = ”;
$Conf{CgiAdminUsers} = ‘backuppc’;
THEN
Edit
$Conf{PingPath} = ”;
TO
$Conf{PingPath} = ‘/bin/ping’;
5. Edit your apache configuration
#vi /etc/httpd/conf.d/BackupPC.conf
<VirtualHost *:80>
# BackupPC requires valid authentication in order for the web interface to
# function properly. One can view the web interface without authentication
# though all functionality is disabled.
#
# htpasswd -c /etc/BackupPC/apache.users yourusername
#
ServerName backuppc.local.Dev
DocumentRoot /usr/share/BackupPC
<Directory /usr/share/BackupPC/>
AuthType Basic
AuthUserFile /etc/BackupPC/apache.users
AuthName “BackupPC”
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAll>
Require valid-user
<RequireAny>
Require valid-user
</RequireAny>
</RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
order deny,allow
allow from all
#allow from 127.0.0.1
#allow from ::1
#require valid-user
</IfModule>
</Directory>
Alias /BackupPC/images /usr/share/BackupPC/html/
#ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin
#ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin
ScriptAlias / /usr/share/BackupPC/sbin/BackupPC_Admin
</VirtualHost>
Create username and password for BackupPC GUI
#htpasswd -c /etc/BackupPC/apache.users backuppc
New password:
Re-type new password:
Adding password for user backuppc
Restart backuppc & Apache service
#systemctl restart backuppc.service
#systemctl restart httpd.service
Then generate backuppc ssh-key & then copy to public to root client for backup
#su – backuppc
#ssh-keygen -t rsa
Note : try to access root client after adding the public key of backuppc server. Just for first time & make it sure that it’s work. For example if you use RSYNC to backup your client server make sure that client server already install RSYNC.
Reference : http://www.plugged.in/linux/centos-7-backuppc-installation-guide.html