This is an old revision of the document!
sudo apt-get install perl
cpan :then from
cpan
run: install Compress::Zlib :and then exit
cpan
(Ctrl+D).
mod_perl
>
sudo apt-get install apache2 libapache2-mod-perl2
suExec
>
sudo a2enmod suexec
tar -xzf BackupPC-3.1.0.tar.gz
cd BackupPC-3.1.0
sudo ln /usr/bin/perl /bin/perl
sudo ./configure.pl
vi /etc/BackupPC/config.pl
vi /etc/BackupPC/hosts
mv /var/www/cgi-bin/BackupPC_Admin /var/www/cgi-bin/BackupPC_Admin.cgi
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/backuppc
sudo a2ensite backuppc
Listen 8085 NameVirtualHost *:8085 <VirtualHost *:8085>
SuexecUserGroup backuppc backuppc DocumentRoot /var/www/
#Also prevent access to our .htpasswd file
<Files ~ "\.htpasswd$"> Order allow,deny Deny from all </Files> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Deny from all </Directory> <Directory /var/www/BackupPC> Order allow,deny Allow from all </Directory> <Directory /var/www/cgi-bin> AddHandler cgi-script .cgi .pl Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all
AuthType Basic
AuthName "BackupPC" AuthUserFile /var/www/backuppc.htpasswd Require valid-user </Directory>
ErrorLog /var/log/apache2/error-backuppc.log
LogLevel warn CustomLog /var/log/apache2/access-backuppc.log combined ServerSignature On
</VirtualHost>
ErrorDocument
directive to the
<Directory /var/www/>
block, you can automatically “redirect” users who don't go to /cgi-bin/BackupPC_Admin.cgi to that file, saving you typing that path, too:
ErrorDocument 403 /cgi-bin/BackupPC_Admin.cgi :then you can just go to http:////machinename//:8085/ instead of http:////machinename//:8085/cgi-bin/BackupPC_Admin.cgi.
sudo /etc/init.d/apache2 force-reload
htpasswd -c /var/www/backuppc.htpasswd andrew
htpasswd /var/www/backuppc.htpasswd notandrew
sudo cp ~/backuppc/init.d/debian-backuppc /etc/init.d/backuppc
sudo update-rc.d backuppc defaults
sudo chmod 755 /etc/init.d/backuppc
sudo chown -R backuppc:backuppc /data sudo find /data -type d -exec chmod 750 {} \;
sudo /etc/init.d/backuppc start
This means the ssh connection has failed. The most likely cause is that ssh is waiting for user input to ask a question about the host key. the solution is to log into the backups box, then switch to the backuppc user and attempt to connect to the target machine manually. If you see any prompts about unknown or changed host keys, then resolve the problem and backups should run cleanly once more.