Backuppc

From Wsms

Jump to: navigation, search

Note: This page should be titled backuppc (all lowercase). It is Backuppc due to technical limitations of Mediawiki.

backuppc is a backup suite that backs up various types of clients to a Linux server. It is written in perl and relies on transport agents such as ssh, samba and rsync.

Contents

installation

linuxmint

Install using Synaptic.

tips

you don't need root access on the linux clients

see: http://backuppc.sourceforge.net/faq/ssh.html#how_can_client_access_as_root_be_avoided

On the backuppc client:
Create a backuppc user with the standard gui control thing or using a command line:

root@harrison:/home# adduser --home /home/backuppc backuppc
Adding user `backuppc' ...
Adding new group `backuppc' (1001) ...
Adding new user `backuppc' (1001) with group `backuppc' ...
Creating home directory `/home/backuppc' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for backuppc
Enter the new value, or press ENTER for the default
        Full Name []: 
        Room Number []: 
        Work Phone []: 
        Home Phone []: 
        Other []: 
Is the information correct? [y/N] y

On the backuppc server:
Login as root, make a key pair (without a passphrase) and copy the public key to the client.

root@hayes:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
bf:18:0b:35:d6:ab:7f:26:a4:cb:74:36:a5:27:77:04 root@hayes
root@hayes:~# scp .ssh/id_rsa.pub backuppc@harrison:
The authenticity of host 'harrison (192.168.1.13)' can't be established.
RSA key fingerprint is f4:b4:1a:bb:6e:bc:18:69:22:89:7a:1c:ec:cb:5d:a8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'harrison,192.168.1.13' (RSA) to the list of known hosts.
backuppc@harrison's password: 
id_rsa.pub                                             100%  392     0.4KB/s   00:00

On the backuppc client:
Set up the account for remote access via the shared key.

backuppc@harrison:~$ mkdir .ssh
backuppc@harrison:~$ mv id_rsa.pub .ssh/authorized_keys2
backuppc@harrison:~$ chmod 700 .ssh
backuppc@harrison:~$ chmod 600 .ssh/authorized_keys2 

su - to become root, disable the password for backuppc by editing /etc/shadow and placing an exclamation mark in the second field:

backuppc:!:13766:0:99999:7:::

Make a /home/backuppc/rsyncSend file:

#!/bin/sh -f
exec /usr/bin/rsync --server --sender $*

Set the ownership and tighten up the permissions:

root@harrison:/home/backuppc# chown backuppc:backuppc rsyncSend 
root@harrison:/home/backuppc# chmod 700 rsyncSend 
root@harrison:/home/backuppc# chmod 700 .

At this point you have an account on the client machine can only be accessed as root from your server machine using the shared key.

see also

http://backuppc.sourceforge.net/ backuppc home page
man backuppc
Backup_&_Recovery_by_W._Curtis_Preston Chapter 5
http://video.google.com/videoplay?docid=-5522639777521833846&q=backuppc&total=1&start=0&num=10&so=0&type=search&plindex=0 A google video presentation on backuppc by Ski Kacorosk a the Washington Linuxfest 2007.
http://blog.firetree.net/2006/08/06/backuppc/
http://www.howtoforge.com/linux_backuppc detailed howto for older version including screendumps

Personal tools