Setting Up Backuppc
Just a note for my backuppc setup.
http://backuppc.sourceforge.net/
(1) We are using Centos 5 and we are using from Centos testing repos
http://dev.centos.org/centos/5/testing/SRPMS/
(2) Make sure to change Apache user to backuppc
(3) add admin (the users for CGI access) to the config.pl of the backuppc as admin
(4) Setup SSH without password
http://backuppc.sourceforge.net/faq/ssh.html
The remote user or the client must not used root. Make sure the permission correctly set. I'm using admin at the remote site.
----------
The server used backuppc id. Create .ssh under /var/lib/backuppc. Change the ownership and permission.
--------------
(5) Used sudo for the admin at the remote site for backup.
example of my sudoers. look for admin ALL=NOPASSWD: /bin/gtar,/bin/tar
-----------
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Important for backuppc
Defaults !lecture
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
admin ALL=NOPASSWD: /bin/gtar,/bin/tar
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
-------
(6)
If you are using port other than 22 for SSH and using sudo the tar client command
$sshPath -p 57000 -q -x -n -l admin $host env LC_ALL=C sudo $tarPath -c -v -f - -C $shareName+ --totals
-----------
(7) Set the hostname using /etc/hosts
Just a note for my backuppc setup.
http://backuppc.sourceforge.net/
(1) We are using Centos 5 and we are using from Centos testing repos
http://dev.centos.org/centos/5/testing/SRPMS/
(2) Make sure to change Apache user to backuppc
(3) add admin (the users for CGI access) to the config.pl of the backuppc as admin
(4) Setup SSH without password
http://backuppc.sourceforge.net/faq/ssh.html
The remote user or the client must not used root. Make sure the permission correctly set. I'm using admin at the remote site.
[root@localhost conf]# cd /home/admin/.ssh
[root@localhost .ssh]# ls -lisa
total 20
31670286 4 drwx------ 2 admin admin 4096 Jun 24 15:08 .
31604738 4 drwx------ 5 admin admin 4096 Jun 24 15:52 ..
31670318 4 -rw------- 1 admin admin 409 Jun 24 15:08 authorized_keys
31670287 4 -rw------- 1 admin admin 883 Jun 24 15:07 id_rsa
31670308 4 -rw-r--r-- 1 admin admin 237 Jun 24 15:07 id_rsa.pub
----------
The server used backuppc id. Create .ssh under /var/lib/backuppc. Change the ownership and permission.
[root@backup .ssh]# cd /var/lib/backuppc
[root@backup backuppc]# ls
cpool passwd pc pool trash
[root@backup backuppc]# cd .ssh
[root@backup .ssh]# ls -lisa
total 20
42074133 4 drwx------ 2 backuppc backuppc 4096 Jun 24 16:38 .
42074113 4 drwxr-xr-x 8 root root 4096 Jun 24 16:37 ..
42074134 4 -rw------- 1 backuppc backuppc 1675 Jun 24 16:38 id_rsa
42074135 4 -rw-r--r-- 1 backuppc backuppc 409 Jun 24 16:38 id_rsa.pub
42074136 4 -rw-r--r-- 1 backuppc backuppc 878 Jun 24 16:38 known_hosts
[root@backup .ssh]# pwd
/var/lib/backuppc/.ssh
[root@backup .ssh]#
--------------
(5) Used sudo for the admin at the remote site for backup.
example of my sudoers. look for admin ALL=NOPASSWD: /bin/gtar,/bin/tar
-----------
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Important for backuppc
Defaults !lecture
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
admin ALL=NOPASSWD: /bin/gtar,/bin/tar
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
-------
(6)
If you are using port other than 22 for SSH and using sudo the tar client command
$sshPath -p 57000 -q -x -n -l admin $host env LC_ALL=C sudo $tarPath -c -v -f - -C $shareName+ --totals
-----------
(7) Set the hostname using /etc/hosts