Backuppc Ubuntu 8.04

Discussion in 'HOWTO-Related Questions' started by rtacconi, May 20, 2008.

  1. phreon

    phreon New Member

    Hi Falko,

    Being a relative nube at Linux I tried what you suggested by using what few commands I know.

    On my server I went to /etc/apache2/sites-available.
    I used sudo nano default and added the path, /etc/backuppc/apache.conf , after </Virtualhost> , which was at the end of that file.

    I was not sure how to restart apache2 so I restarted the server. In my Firefox browser I used 192.168.2.10/backuppc to go to the server and Firefox could not connect. I tried just 192.168.2.10 and I can not connect. I used to be able to at least get to the server through the browser but not now.

    I then thought you may have meant that I should copy the contents of /etc/backuppc/apache.conf into /etc/apache2/sites-available/default. I restarted my server and still cannot connect.

    I have deleted the changes to /etc/apache2/sites-available/default.

    I apologize for my clumsy work. Please let me know where I went wrong.

    Thanks
    P
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Please insert the content before </Virtualhost>.
     
  3. phreon

    phreon New Member

    I inserted the content before </Virtualhost>, changes are in red.
    I shut down and restarted the server and I was not able to go to backuppc from a browser.

    The contents of default now are ...

    NameVirtualHost *
    <VirtualHost *>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128

    Order allow,deny
    Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    Alias /backuppc /usr/share/backuppc/cgi-bin/

    <Directory /usr/share/backuppc/cgi-bin/>
    AllowOverride None $
    Options ExecCGI FollowSymlinks
    AddHandler cgi-script .cgi
    DirectoryIndex index.cgi

    AuthGroupFile /etc/backuppc/htgroup
    AuthUserFile /etc/backuppc/htpasswd
    AuthType basic
    AuthName "BackupPC admin"
    require valid-user

    </Directory>


    </VirtualHost>



    Thanks
    P
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Do you see any errors when you restart Apache? Are there any errors in Apache's error log?

    Is this the only vhost you have on the system, or are there any other vhosts?
     
  5. phreon

    phreon New Member

    I did not see errors when I restarted the server.

    I only have installed Ubuntu Server 8.04 and the apps required in your tutorial. No other vhosts.

    Using Google to help me find an error log I discovered /var/log/apache2/error.log

    I pasted the contents below. I checked in /var/www and there is no backuppc file there as per the error message.



    [Tue Dec 23 03:43:59 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Tue Dec 23 03:44:51 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 03:44:52 2008] [error] [client 192.168.2.3] File does not exist: /var/www/favicon.ico
    [Tue Dec 23 03:44:55 2008] [error] [client 192.168.2.3] File does not exist: /var/www/favicon.ico
    [Tue Dec 23 03:47:02 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 03:57:20 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 03:57:24 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 03:57:25 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 03:57:25 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 04:04:29 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 04:41:11 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 04:41:20 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backupPC
    [Tue Dec 23 10:05:27 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Tue Dec 23 13:56:20 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Wed Dec 24 05:51:13 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Wed Dec 24 05:51:45 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Wed Dec 24 05:52:22 2008] [error] [client 192.168.2.3] File does not exist: /var/www/home
    [Wed Dec 24 06:10:57 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Wed Dec 24 06:11:02 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Wed Dec 24 06:11:16 2008] [error] [client 192.168.2.3] File does not exist: /var/www/BackupPC
    [Wed Dec 24 06:11:22 2008] [error] [client 192.168.2.3] File does not exist: /var/www/BackupPC
    [Wed Dec 24 06:49:25 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Wed Dec 24 07:10:22 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Wed Dec 24 10:28:31 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Thu Dec 25 03:18:57 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Thu Dec 25 03:38:15 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Thu Dec 25 03:38:15 2008] [error] [client 192.168.2.3] File does not exist: /var/www/favicon.ico
    [Thu Dec 25 03:38:18 2008] [error] [client 192.168.2.3] File does not exist: /var/www/favicon.ico
    [Thu Dec 25 03:38:24 2008] [error] [client 192.168.2.3] File does not exist: /var/www/backuppc
    [Thu Dec 25 04:17:01 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Fri Dec 26 04:03:45 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Fri Dec 26 04:25:50 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Sat Dec 27 03:51:22 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Sat Dec 27 03:55:27 2008] [error] [client 192.168.2.3] File does not exist: /var/www/favicon.ico
    [Sat Dec 27 03:55:30 2008] [error] [client 192.168.2.3] File does not exist: /var/www/favicon.ico
    [Sat Dec 27 03:55:51 2008] [error] [client 192.168.2.3] File does not exist: /var/www/var
    [Sat Dec 27 04:49:53 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Sun Dec 28 05:09:55 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Sun Dec 28 05:29:05 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Mon Dec 29 03:16:02 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Mon Dec 29 03:51:13 2008] [notice] caught SIGWINCH, shutting down gracefully
    [Tue Dec 30 03:03:30 2008] [notice] Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations
    [Tue Dec 30 03:20:35 2008] [notice] caught SIGTERM, shutting down


    Happy New Year!
    P
     
    Last edited: Jan 1, 2009
  6. maksimkubuntu

    maksimkubuntu New Member

    Wow.. I've got very same symptoms/error with my KUBUNTU server...
    Waiting for further responses...
     
  7. falko

    falko Super Moderator Howtoforge Staff

    What are the outputs of
    Code:
    ls -la /usr/share/backuppc/cgi-bin/
    and
    Code:
    ls -la /etc/backuppc/
    ?
    What happens when you try to go to backuppc in your browser now?
     
  8. phreon

    phreon New Member

    The output of ls -la /usr/share/backuppc/cgi-bin/ ...

    total 12
    drwxr-xr-x 2 root root 4096 2008-12-22 14:10 .
    drwxr-xr-x 7 root root 4096 2008-12-22 14:10 ..
    lrwxrwxrwx 1 root root 8 2008-12-22 14:10 image -> ../image
    -rwsr-xr-x 1 backuppc backuppc 3993 2007-10-24 16:24 index.cgi


    The output of ls -la /etc/backuppc/ ...

    total 104
    drwxr-xr-x 2 backuppc root 4096 2008-12-22 14:10 .
    drwxr-xr-x 79 root root 4096 2009-01-02 04:46 ..
    -rw-r--r-- 1 backuppc root 414 2007-10-24 16:24 apache.conf
    -rw-r--r-- 1 backuppc root 77591 2007-10-24 16:24 config.pl
    -rw-r--r-- 1 backuppc root 2238 2007-10-24 16:24 hosts
    -rw-r--r-- 1 backuppc root 0 2008-12-22 14:10 htgroup
    -rw-r--r-- 1 backuppc root 23 2008-12-22 14:36 htpasswd
    -rw-r--r-- 1 backuppc root 427 2007-10-24 16:24 localhost.pl


    When I try to go to backuppc from the browser it reports ...

    Failed to Connect

    Firefox can't establish a connection to the server at 192.168.2.10.


    Thanks
    P
     
  9. maksimu

    maksimu New Member

    Here is what i have for those commands:

    Code:
    maksim@Jedi-Kubuntu:~$ ls -la /usr/share/backuppc/cgi-bin/
    total 12
    drwxr-xr-x 2 root     root     4096 2009-01-01 20:35 .
    drwxr-xr-x 7 root     root     4096 2009-01-01 20:35 ..
    lrwxrwxrwx 1 root     root        8 2009-01-01 20:35 image -> ../image
    -rwsr-xr-x 1 backuppc backuppc 3993 2008-08-11 01:40 index.cgi
    Code:
    maksim@Jedi-Kubuntu:~$ ls -la /etc/backuppc/
    total 116
    drwxr-xr-x   2 backuppc root  4096 2009-01-01 20:35 .
    drwxr-xr-x 126 root     root 12288 2009-01-02 21:14 ..
    -rw-r--r--   1 backuppc root   721 2008-08-11 01:40 apache.conf
    -rw-r--r--   1 backuppc root 81118 2008-08-11 01:40 config.pl
    -rw-r--r--   1 backuppc root  2238 2008-08-11 01:40 hosts
    -rw-r--r--   1 backuppc root     0 2009-01-01 20:35 htgroup
    -rw-r--r--   1 backuppc root    23 2009-01-01 22:01 htpasswd
    -rw-r--r--   1 backuppc root   427 2008-08-11 01:40 localhost.pl
    lrwxrwxrwx   1 backuppc root    13 2009-01-01 20:35 pc -> /etc/backuppc
     
  10. falko

    falko Super Moderator Howtoforge Staff

    It seems as if Apache isn't working anymore. What are the outputs of
    Code:
    netstat -tap
    and
    Code:
    apache2 -t
    ?
     
  11. phreon

    phreon New Member

    netstat -tap

    apache2: bad user name ${APACHE_RUN_USER}
    al@ubuntuServer:~$ sudo netstat -tap
    [sudo] password for al:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 *:netbios-ssn *:* LISTEN 4432/smbd
    tcp 0 0 ubuntuServer.Siesta:ipp *:* LISTEN 4162/cupsd
    tcp 0 0 localhost:smtp *:* LISTEN 4415/exim4
    tcp 0 0 *:microsoft-ds *:* LISTEN 4432/smbd
    tcp6 0 0 [::]:ssh [::]:* LISTEN 4114/sshd
    tcp6 0 0 ubuntuServer.Siesta:ssh 192.168.2.3%8191:60746 ESTABLISHED 4149/sshd: al [priv


    apache2 -t

    apache2: bad user name ${APACHE_RUN_USER}


    Thanks
    P
     
  12. maksimu

    maksimu New Member

    Yeah... same here..
    i'm pretty sure that the problem is with Apache server... there is no user.

    What is the right way of installing/configuring Apache server?
     
  13. maksimu

    maksimu New Member

    Also i think you should take out "$" from third line in (See below)

     
  14. maksimu

    maksimu New Member

    Here is my third consecutive reply :D

    I just made it working... I tried different things.. and I think this thing helped me to make it to work:

    Code:
    sudo APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data apache2 -t 
    Found it HERE
     
  15. falko

    falko Super Moderator Howtoforge Staff

    Does
    Code:
    sudo APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data apache2 -t
    show any errors?
     
  16. phreon

    phreon New Member

    Hi Falko,

    It Works !!

    Using:

    sudo APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data apache2 -t

    I got this error:

    Syntax error on line 46 of /etc/apache2/sites-enabled/000-default:
    Illegal override option $

    So I used maksimu's suggestion from his post and removed the $ from the /etc/apache2/sites-available/default file.

    I was able to get into BackupPC from my browser. It took my password and I can now continue to follow your tutorial. Seems funny that after all this time I am still on the beginning page!

    The tutorial uses an older version of BackupPC. The current version appears to allow configuration through a browser GUI. Can the current backuppc version be set up through the GUI or does one need to edit the files as required in your tutorial?

    Thanks so much for your help.
    P
     
    Last edited: Jan 4, 2009
  17. maksimu

    maksimu New Member

    Everything is fine with that tutorial.. just follow all instructions and it should work fine.

    By the way, FYI, i had one small problem with smb connection, apparently there is a bug in newer versions of backuppc. The problem is backuppc connecting to Win Vista it's blocking connection. Just read THIS bug description and you will get the idea of that problem.

    When I removed "-N" from $Conf{SmbClientFullCmd}, $Conf{SmbClientIncrCmd}, and $Conf{SmbClientRestoreCmd} it worked fine

    Happy backuppc'ing
     
  18. phreon

    phreon New Member

    My question really is that the latest backuppc seems to be configured through the browser GUI, and the version in the tutorial is configured by manually editing config files with a text editor?

    Does the error you found effect Win XP?

    Thanks
    P
     

Share This Page