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

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 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/ 
## 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/ 
The key fingerprint is: xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

9.Server Key to Client

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

10.service backuppc restrat
 chkconfig backuppc on
 service httpd restart
 chkconfig httpd on 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. on select host option and click on the client system ipadd. on edit config option in that click on xfer option.

15.edit the rsync share name ex:\\home\fcoos.
save the file. on start full backup on status option,it will show backup status.
Thanks and Regards, Prashant.N.K












Leave a Reply