BackupPC-users

Re: [BackupPC-users] backuppc interface web

2008-07-01 05:57:37
Subject: Re: [BackupPC-users] backuppc interface web
From: Alex Schaft <alexs AT quicksoftware.co DOT za>
To: fatima ech-charif <echchariffatima AT gmail DOT com>
Date: Tue, 01 Jul 2008 11:57:23 +0200
On 2008/07/01 11:47, fatima ech-charif wrote:
Hi

 i installed backuppc in ubuntu gusty 7.10
with this process:

*******************************************************************************************************************************
# apt-get install openssl openssh-client rsync apache2-utils libdigest-md5-perl libarchive-zip-perl libfile-rsyncp-perl perl-suid smbclient samba-common sysv-rv par2 lighttpd postfix

Note postfix is optional and I use lighttpd.  If you want apache your on your own.

# cd /tmp
# wget http://voxel.dl.sourceforge.net/sourceforge/backuppc/BackupPC-3.1.0.tar.gz
# tar xzf BackupPC-3.1.0.tar.gz
# cd BackupPC-3.1.0
# useradd -r -d /etc/BackupPC -s /bin/bash backuppc
# mkdir /etc/BackupPC && chown backuppc:backuppc /etc/BackupPC
# mkdir /var/www/backuppc
# perl configure.pl

--> Full path to existing main config.pl []?
       [enter]
--> Are these paths correct? [y]?
       [enter]
--> BackupPC will run on host [server.somedomain.tld]?
       Your host name or [enter]
--> BackupPC should run as user [backuppc]?
       [enter]
--> Install directory (full path) [/usr/local/BackupPC]?
       [enter]
--> Data directory (full path) [/data/BackupPC]?
       Full path to where you want to store backups.
--> Compression level [3]?
       I use 3.  [enter]
--> CGI bin directory (full path) []?
       /var/www/backuppc
--> Apache image directory (full path) []?
       /var/www/backuppc
--> URL for image directory (omit http://host; starts with '/') []?
       /backuppc
--> Do you want to continue? [y]?
       [enter]

# chown -R backuppc:www-data /var/www/backuppc /etc/BackupPC
# mv /var/www/backuppc/BackupPC
_Admin /var/www/backuppc/admin
# chmod 4554 /var/www/backuppc/admin
# cp init.d/debian-backuppc /etc/init.d/backuppc
# chown root:root /etc/init.d/backuppc
# chmod 755 /etc/init.d/backuppc
# update-rc.d backuppc default
# cd /etc/lighttpd

This next part creates a self signed ssl certificate.  Self signed is better than nothing for sure however with firefox/mozilla you will have to accept it tempararly every time.  You can desside if encryption is worth it for you or not.  I use it.  You can make the days to experation greater if you wish.

# openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes

No we are going to create you backuppc users for use in your /etc/BackupPC/hosts file.  There must be at least one.  You can give these users different privilages in the backuppc web interface.  Ok lets create the first user and the file.

# htdigest -c backuppc.auth.htdigest backuppc admin

To create a second user the command is the same just drop the -c flag and change the username from admin to something you want.

Now we need to setup the lighttpd.conf.  Use your favorite editor to open /etc/lighttpd/lighttpd.conf.  I use nano my self.

# nano -w /etc/lighttpd/lighttpd.conf

Find the server.modules section and add these three lines if they are not there:

           "mod_cgi",
           "mod_redirect",
           "mod_auth",

Now go to the end of the file and add the following:

----snip--------------------------------------------

auth.debug = 0
auth.backend = "htdigest"
auth.backend.htdigest.userfile = "/etc/lighttpd/backuppc.auth.htdigest"
auth.require = ( "/backuppc" =>
 ( "method"  => "digest",
   "realm"   => "backuppc",
   "require" => "valid-user"
 )
)

cgi.assign = (
       "/backuppc/admin" => ""
)

$SERVER["socket"] == ":443" {
 ssl.engine = "enable"
 ssl.use-sslv2 = "disable"
 ssl.pemfile = "/etc/lighttpd/lighttpd.pem"
}

# Only allow acess to the backup pc interface over https.
$SERVER["socket"] == ":80" {
 $HTTP["host"] =~ ".*" {
   url.redirect = ( "^/backuppc(.*)" => "https://%0/backuppc$1" )
 }
}

----snip--------------------------------------------

Now we will update the backuppc config.pl file to give full privlilages to the admin user we created for the web interface.

# sed -i -r -e "s/\\\$Conf\{CgiAdminUsers\} += ''/\\\$Conf\{CgiAdminUsers\} = 'admin'/" /etc/BackupPC/config.pl

Ok now we should be ready to restart the webserver and startup backuppc.

# /etc/init.d/lighttpd restart
# /etc/init.d/backuppc start

if all goes well that should be it.  You can now browse to the backuppc cgi interface by using:

https://ip.of.your.server/backuppc/admin






 ****************************************************************************
BUT    i have this problem:

II can't open backuppc ' interface web

 THANKS








------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php

_______________________________________________ BackupPC-users mailing list BackupPC-users AT lists.sourceforge DOT net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/

There's an extra character (l) in your url...
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>