Joerg Zinke writes: >> I've got an updated port for BackupPC 3.0.0beta2. I'll send you >> the files as soon as I've fixed a couple of minor bugs. > > can you send the files here to ports@ since other people (at least > me) are interested in that port too.
I've attached the current version of the BackupPC port. The README.OpenBSD file is incomplete but should contain enough information to get going. > did you managed it to get the cgi running in chroot? or did you just > disable the chroot for the cgi? I run another non-chrooted httpd instance that only listens on 127.0.0.1 and runs with the privileges of the _backuppc user. Connections can be forwarded with ProxyPass from the chrooted httpd instance. Alternatively, SSH port forwarding can be used to access the BackupPC web frontend. I'm struggling with one problem. On startup, BackupPC version 3 checks whether all executables that are specified in the configuration file exist. BackupPC quits if an executable is missing. Thus the current port depends on the optional packages gtar, samba, bzip2, rsync and par2cmdline. BackupPC version 2 didn't check for the presence of optional executables. Thus it was possible to specify these executables in the configuration file without the need to depend on the optional packages. On the one hand, I'd like to keep the port simple. On the other hand, I don't want the BackupPC port to depend on gtar and samba, since most people will probably use rsync to backup their hosts. I can think of several solutions to this problem: 1. By default, the BackupPC port could depend on all packages. But we could add flavors like no_gtar and no_samba that disable the dependencies so that people can easily build their own packages that don't depend on samba etc. 2. We could set the path names of the optional executables to the empty string so that BackupPC doesn't look for these executables on startup. But then users would have to set the path names manually in the configuration when an optional package is installed. 3. We could disable the checks for the executables. The changes in BackupPC would be rather small, but I'd like to avoid changes to the upstream sources if possible. Unfortunately, there's a bug in BackupPC's configure.pl. If a path is set to the empty string, configure.pl will output the default path, e.g. '/usr/bin/smbclient', instead of the empty string. I haven't decided yet how to fix this bug. This bug affects solutions 1 and 2. Personally, I'd go for solution 1. What do you think? There's another issue I'm not happy with. I used to keep the files for the second httpd instance in /var/backuppc/www/{conf,htdocs,logs}. I now decided to put httpd.conf into /etc/backuppc alongside the BackupPC configuration files. The httpd log files are kept in /var/log/backuppc alongside the BackupPC log files. IMHO it makes sense to keep these files together - especially the configuration files. Also, I don't expect the file names that are used by BackupPC and httpd to ever clash. But OpenBSD's httpd insists on creating the file logs/etag-state in the ServerRoot directory that I have set to /etc/backuppc. Since the path name logs/etag-state cannot be configured I have to create a symbolic link called /etc/backuppc/logs that points to /var/log/backuppc. This also means that I have to add an @exec statement to PLIST. Not nice, but I can't think of a better solution. What else is there to say? By default, the BackupPC httpd instance now listens on port 8081 on localhost. The port can be set with BACKUPPC_HTTPD_PORT in the Makefile. Any suggestions for another default port instead of 8081? The _backuppc user has got the user and group id 599. This will change if the BackupPC port should ever make it into the ports tree. If you have used a previous version of the BackupPC port you must move several files and directories. If a hard disk partition is mounted on /var/backuppc that partition should now be mounted on /var/db/backuppc. The contents of /var/backuppc/conf needs to be moved to /etc/backuppc. Don't forget to compare the old and new config.pl. The config files of the individual hosts ought to be moved one level down into the directory /etc/backuppc/pc. The contents of /var/backuppc/www/conf should also be moved to /etc/backuppc. Make sure to update your httpd.conf. You can move the contents of /var/backuppc/logs and /var/backuppc/www/logs to /var/log/backuppc if you would like to keep your log files. The sub directories cpool, pc, pool, trash, and .ssh have moved from /var/backuppc to /var/db/backuppc. Make sure to set the home directory of the user _backuppc to /var/db/backuppc. BackupPC's httpd must now be started with "httpd -d /etc/backuppc -f /etc/backuppc/httpd.conf -u" instead of "httpd -d /var/backuppc/www -u". The directory /var/backuppc is no longer needed once you have moved all your files. Regards, Andreas
port-p5-File-RsyncP.tar.gz
Description: File::RsyncP port required by BackupPC
port-backuppc.tar.gz
Description: BackupPC 3.0.0beta2 port