Configure BackupPC in Centos 5.7

1. yum install backuppc, yum install httpd.

2.Configure Apache,

# vim /etc/httpd/conf/httpd.conf 
 Change User apache to User backuppc User backuppc Servername backuppc.domain.com:80

Save the file.

3.then change the backuppc.conf file that was created under the conf.d directory. 
# vim /etc/httpd/conf.d/backuppc.conf ## Change Allow from 127.0.0.1 to all Allow from all

Save the file.
4.create the user and password that you are going to allow access to the web interface. 
# htpasswd -c /var/lib/backuppc/passwd/htpasswd your_user 
New password: your_password 
Re-type new password: your_password 
Adding password for user your_user

5. service httpd restart
 chkconfig httpd on

6.BackupPC Server Configuration, BackupPC Main Config
Edit the config file below mention.
# vim /etc/BackupPC/config.pl 
## Default transfer method BackupPC uses. $Conf{XferMethod} = 'rsync';
 ## Path to where actual backup  data is stored. $Conf{TopDir} = '/var/lib/backuppc'; 
## Path to init.d which is used to to start server. $Conf{ServerInitdPath} = '/etc/init.d/backuppc'; 
$Conf{ServerInitdStartCmd} = '$sshPath -q -x -l root $serverHost$serverInitdPath start'; 
## Allowed user that you created using htpasswd. $Conf{CgiAdminUsers} = 'your_user';

save the file.

7.BackupPC Sudo Setup
# visudo ## Comment out Defaults requiretty 
## Add the following two lines. Defaults !lecture backuppc ALL=NOPASSWD:/bin/gtar,/bin/tar.

save the file.

8.BackupPC SSH Keys.
# cd /var/lib/backuppc # mkdir .ssh # chown backuppc.backuppc .ssh # chmod 700 .ssh 

Next, drop in as the backuppc user. You’ll have to specify a shell because by default the backuppc user has no shell assigned to it. Then create the passwordless SSH keys using ssh-keygen.

# su -s /bin/bash backuppc bash-3.2$ ssh-keygen -t dsa Generating public/private dsa key pair.
 Enter file in which to save the key (/var/lib/backuppc/.ssh/id_dsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /var/lib/backuppc/.ssh/id_dsa.
Your public key has been saved in /var/lib/backuppc/.ssh/id_dsa.pub. 
The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx backuppc@host.domain.name

9.Server Key to Client

bash-3.2$ ssh-copy-id -i .ssh/id_dsa.pub root@host_to_backup

10.service backuppc restrat
 chkconfig backuppc on
 service httpd restart
 chkconfig httpd on

11.open the browser http://ipaddofbackuppc/BackupcPC
 it will pop the username and passwd.

12. add the clien system ipadd and username in edit host option.

 and save the file.

13.click on select host option and click on the client system ipadd.

14.click on edit config option in that click on xfer option.

15.edit the rsync share name ex:\\home\fcoos.
save the file.

16.click on start full backup

17.click on status option,it will show backup status.
Thanks and Regards, Prashant.N.K

 

 

 

 


 

 

 

 

 

 

 

Leave a Reply