Hi,
Jason M. Kusar wrote on 06.05.2007 at 18:04:52 [Re: [BackupPC-users] Is it
possible to use an alternative web server instead of Apache?]:
> MrE wrote:
> > I'm running a slug (Linksys NSLU2) with Debian/NSLU2 Etch, which only
> > has 32 MB of RAM. I was wondering if there is a way to get BackupPC to
> > run on a lighter web server such as thttpd or lighttp in order to save
> > precious RAM, and if so, how would I go about this?
I'm afraid I'm going to answer some questions you didn't ask :-).
First of all, BackupPC doesn't "run on a web server". BackupPC is a Perl
daemon. It comes with a web interface, which is a Perl CGI that communicates
with the daemon. There are a number of things you could do:
1. Not use the web interface
BackupPC is configured completely via text files. In version 3.x.x, you
can edit these through the web interface, but you can also edit them with
any normal text editor. You can configure automatic backups simply by
changing the configuration files. You can additionally request backups
outside the schedule through a CLI.
That is probably not going to be much fun though. Restoring files will
probably be rather complicated (well, you can access individual files
from any backup rather easily, but you won't want to restore 1000 files
on a file-by-file basis).
In any case, you only occasionally need the web interface. You won't want
to keep a web server running unnecessarily during the backups if you've
only got 32MB RAM.
2. Not use a web server
There were reports of using w3m to locally execute the BackupPC CGI
script. That was back in 2004 though, I'm not sure if it still works for
3.x.x.
3. Use a different web server
> Since the web interface is simply a perl script, you could run it under
> any web server that supports CGI.
It will need to run as the BackupPC user though to have access to the
pool. The Perl script is setuid by default, which does not work with
apache/mod_perl, for instance. Other web servers may have similar
limitations.
You *could* set up BackupPC to use the www-data user (or whatever
your alternative web server runs as) instead of backuppc to work around
that, but it would be better to select a web server that supports setuid
CGI scripts.
4. Run the web server on another machine
You can run apache on a different host. The web server will need to be
able to communicate with the BackupPC daemon through a TCP socket, and it
will need access to the BackupPC pool (NFS mount, use same path on
BackupPC server and web server).
5. Run BackupPC on another machine :-)
Yes, I remember running X-Windows on a 80386 with 4MB RAM and a swap file
on an ext2fs on a floppy disk, but it's not necessarily something I'd
recommend for everyday use.
BackupPC speed seems to be usually limited by disk seeks, meaning it
needs to do quite a few of them. Most people running BackupPC probably
have more than 32MB *of buffer cache* during backups. Your system will
have next to no memory to dedicate to buffer cache, meaning you will have
additional disk seeks even where other people don't.
How fast is the CPU of a "Linksys NSLU2"?
Actually, I'd anticipate headaches due to the BackupPC pool properties in
a low memory machine in other places too (eg. fsck).
> Be warned though, 32MB is going to be
> pretty tight for running backups. I have a feeling rsync won't work in
> that little bit of ram.
I have no idea if there's any chance this will work. I agree that rsync
won't work, at least if you're backing up more than a couple of files. If
you really want to try, you'll want to set
$Conf{MaxBackups} = 1;
$Conf{MaxUserBackups} = 0;
$Conf{MaxBackupPCNightlyJobs} = 1;
How much data did you intend to back up with this setup?
Regards,
Holger
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/