Nethserver-BackupPC, need tests

http://mirror.de-labrusse.fr/nethserver/nethserver-BackupPC/

You need to enable epel (thanks to michele)

Add EPEL repo:

yum localinstall http://ftp.heanet.ie/pub/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

Disable it:

eorepo centos-base centos-updates nethserver-base nethserver-updates

and install the module

yum install http://mirror.de-labrusse.fr/nethserver/nethserver-BackupPC/nethserver-BackupPC-1.0.1-1.ns6.noarch.rpm --enablerepo=epel

sources are https://github.com/stephdl/nethserver-BackupPC/tree/ns6

I’m not the first author, it is an adaptation to nethserver of a smeserver contribs of Daniel Berteaud, of course I’m open to discussion, if you think that we can add more features.

For the ldap authentication I use the ‘libuser’, not sure that it is safe, but I wanted to run a apache session with another default user. I used to authenticate with ‘pwauth’ but in this case the backuppc user has to be member of the apache group, that leads to the same, therefore I decided to use ldap.

Once installed, the admin cgi user is ‘admin’ (think to set a password for ns6.6) but any users can perform a login however they can manage only the their backups(eg the admin user needs to set backups for this user). If you want to restrict the cgi interface only for the admin, then set the db ‘CgiMultiUser’ to disabled

see db commands

# config show backuppc
backuppc=service
    CgiMultiUser=enabled
    examples=enabled
    status=enabled
    sudo=/usr/bin/rsync,/bin/gtar,/bin/tar

CgiMultiUser -> enabled all users in ldap can use the backuppc CGI, disabled and only admin can do it
sudo-> you can add here more commands available by sudo to backuppc
if you want to modify something, then

config setprop backuppc CgiMultiUser disabled
signal-event nethserver-BackupPC-update

other DB available

# config show httpd-bkpc 
httpd-bkpc=service
    TCPPort=950
    access=none
    status=enabled

the service which run the other apache session can be controlled by

service httpd-bkpc restart #(available stop, start, restart, status)
or (enabled or disabled)

config setprop httpd-bkpc status disabled 
signal-event nethserver-BackupPC-update

Then go to https://yourIP/BackupPC or Dashboard->Applications->BackupPC
You will find two urls
https://yourIP/BackupPC -> the cgi interface
https://yourIP/cygwin -> a web page to help the cygwin-rsyncd settings for windows

Automatically, a rsa key is created in /var/lib/BackupPC/.ssh (4098 bits) you can use it to authenticate without password if you want to backup a linux host

first you need to export the public key

su -s /bin/sh backuppc
ssh-copy-id -i ~backuppc/.ssh/id_rsa.pub root@192.168.xxx.xxx

and test if all is ok

 ssh root@192.168.xxx.xxx

if it is ok you can log without password, then do ‘exit’ to go out of the shell

Of course you can use a lot of protocol (smb,ftp,rync,rsynd,tar,…)

  • Remove all backups of a client
    then

    rm -rf /var/lib/BackupPC/pc/client/
    sudo -u backuppc /usr/share/BackupPC/bin/BackupPC_serverMesg BackupPC_nightly run

  • Remove One backup of a client

    cd /var/lib/BackupPC/pc/client/
    ls
    rm -fR backup_number
    sudo -u backuppc /usr/share/BackupPC/bin/BackupPC_serverMesg BackupPC_nightly run

Removing a single backup must be done with extreme care. You can safely remove the last backup for example, but if you remove a backup on which another one is based on, you can screw up your backups

After this, you will see space reclaimed and you can check it with df, but you still need to remove statistic line, otherwise you will see it in your web interface. To do that:

 vi /var/lib/BackupPC/pc/client/backups

you can remove the line with the backup_number.

Relog to your web interface and voila! No more backup_number.

  • what it can be enhanced
    some scripts to wake on lan computer before to backup them
    some scripts to backup windows computers with shadows copy

well a lot of more of course, i’m waiting your scripts and your ideas.

4 Likes

Uh!!! Looking forward to test it out mate! :+1:
Your modules rock, thanks for you impressive work! @AbsyntH will certainly be bery happy for this gift :slight_smile:

GREAT! i’ll test in a VM as soon as possible, for now i’m working out on clients configuration

1 Like

We can add templates of backup client in backuppc…so that could be interesting to propose it

2 Likes

I just tested it and works like a charm :wink:

This howto is becoming useless and old @AbsyntH :older_man:

You guys are driving at speed of light :smiley:

My brain is not so fast :weary:

http://sourceforge.net/projects/backuppc/files/cygwin-rsyncd/3.0.9.0/ @stephdl :smile: this seems to be a good start for clients’ (windows) setup

1 Like

@alefattorini mark it (AND YUORSELF :stuck_out_tongue_winking_eye: ) “deprecated”

Good, can you edit your howto with the client configuratiob? I wanna try it asap :wink:

to backup windows clients via backuppc/rsyncd the search keys are “rsync vss”

you’ll find many results

HTH

Sure that it can be enhanced…i have just done the basic feature. All templates concerning backups are missing.

Change releasever ref into ok repo url (mandatory or installation fails):

sed -i ‘s/rhel$releasever/rhel6/’ /etc/yum.repos.d/ok.repo

I’ve pasted this part for error, obviously it’s not necessary

Thanks michele, the howto has been updated with a new version of backuppc, keep me in touch if you have some issues.

2 Likes

Sorry @stephdl i’ve posted a wrong piece of code in my last post (i’ve edited it ) damned mobile :confused:

@stephdl http://www.michaelstowe.com/backuppc/ this seems to be the answer of all your last questions

Yep I found that howto, but now I’m looking about kamikazes for testing it :slight_smile:

LOL … tomorrow i can try it on a couple of desktops if i’ve a bit of free time :wink:

1 Like

Do you have some returns about this howTO ? http://www.michaelstowe.com/backuppc/

sorry, i didn’t try it yet, but i’ve just installed your package on my nethserver and now i’m going to set up all backups (and of course i’ll test also this howto)

@stephdl your package works perfectly…from my point of view it’s ready for Nethforge

1 Like