Craig Barratt

BackupPC is a high-performance, enterprise-grade backup system for backing up Linux, WinXX PCs, Macs and laptops to a server's disk. Features include clever pooling of identical files, no client-side software, and a powerful Apache/CGI user interface.

Screenshot thumbnail
Host summary screen
Screenshot thumbnail
Server status screen

Project Members:


SourceForge Support: Site Support: #11212


  • Terry Schmidt

    Terry Schmidt - 2014-06-27

    2 servers failed to backup. Backuppc was unable to PING but the servers were otherwise up. Discovered File and Print Sharing had been disabled on both servers. Unknown. After enabling F&P sharing, A full backup was started and completed successfully. The next morning, same 2 servers were idle, no incremental backup was performed the night before. All other systems backing up normally. I started an incremental backup and both servers completed. All configuration and settings are normal. Will these 2 systems resume their backups after a cycle of normal backups or what else can be causing them to stay idle? All servers are scheduled for backup at 11:00pm. No other issues.

    Last edit: Terry Schmidt 2014-06-27
  • Joanna

    Joanna - 2015-01-28


    I have a problem about schedule.
    Yesterday, my backuppc ran on 2 clients with full backup.
    the first one had done at 00:32 a.m and the other ends at 2:38 a.m.
    But, the two clients ran suddenly at 5:19 am and 6:44 a.m of that morning.
    I set up on these clients in Blackout periods from Hour Begin : 0 to Hour End : 23.7
    and WeekDays : 1,2,3,4,5.
    Wakeup Schedule is 1 , 4.
    I want to know what is the problem and
    How can i stop suddenly running???

  • accesscoder

    accesscoder - 2015-06-02

    Some hints for FreeBSD users that may make this excellent software a bit simpler to get up and running (and I have added an additional guide below on 2015-09-27 to getting the cgi interface working under FreeBSD/Apache24 if you prefer not to use mod_perl for some reason):

    You can install it from ports, it's in sysutils/backuppc, but if you're using it with rsync then you will also need to install net/p5-File-RsyncP. If you're planning on using an ssh authorized_keys connection to backup FreeBSD hosts then you will run into a problem as FreeBSD will install it with the 'nologin' shell and the 'nonexistent' home directory, the solution is to create a 'backuppc' directory in /home and chown it to backuppc:backuppc, then use chpass to set backuppc's home directory from /nonexistent to /home/backuppc - leave the shell set to 'nologin'. Then set up the passwordless connection from, say, the root account, making sure to connect at least once so that the remote system(s) are in 'known_hosts', then create an '.ssh' directory in /home/backuppc with a 'known_hosts' with the relevant hosts in it, and a copy of root's 'id_dsa.pub' public key (you may wish to make one specifically for BackupPC's use, rather than use root's regular one). Be sure to set the correct ownership and permissions on the '.ssh' directory and contents. Then add the hosts to BackupPC's configuration and you're in business!

    One other thing - I couldn't get the BackupFilesExclude to work using the suggested syntax, but I found that if I set the sharename to '*' and then inserted each path that I wished to exclude as a separate entry within it (in the CGI interface) that it worked perfectly.

    I thought I'd add this here as it took me quite a bit of head-scratching to figure the above out, but having done so, I found that it was well worth it!

    Thanks to Craig and his team for a great piece of software, I thought that I was going to have to go down the Bacula or Amanda route, and BackupPC is much more straightforward and modern for those who just want to perform no-fuss backups to disk!

    Addition on 2015-09-27:

    If you're running BackupPC_Admin (the web-cgi admin interface) under mod_perl in a dedicated instance of Apache 2.2 or 2.4 running as the 'backuppc' user, then setting it up is straightforward.

    If, however, you wish to use a shared Apache that is running as 'www:www' rather than as the 'backuppc' user, you are in for a tough time getting it up and running! Here's my solution.

    The problem: You can't setuid in Perl versions above Perl5.12 (iirc). Apache has suexec, but it won't let you use it if the uid/gid of the target file is below 1000, and it's hard-coded into Apache at compile time. The uid/gid we need to suexec is, by default, 300:300. So this won't work.

    One solution: Use a wrapper program, such as that described on the Archlinux ArchWiki: https://wiki.archlinux.org/index.php/BackupPC

    My solution: As my Apache hosts were development machines that were multi-purpose, but not public-facing, and I wished to avoid messing about with wrappers and was not running any cgi apps, I chose to recompile Apache without the suexec restriction, though not removing it entirely, but instead reducing the limit down to an uid/gid of 300. If you're using packages rather than ports then you're out of luck, unless you wish to get your hands dirty and install the ports tree and ports-mgmt/portmaster.

    I wasn't running any cgi applications on my target hosts, so I was happy to sacrifice my cgi-bin directories for the exclusive use of backuppc, but if you are running other cgis then you will need to use an alternative 'cgi-bin2' or whatever for the BackupPC_Admin launcher app, as it won't co-exist with other cgis using my technique, I won't describe that here, but you will still need to know some of what follows below.

    I will use Apache 2.4 for my example here, just substitute 'apache22' for 'apache24' in anything below, should you prefer to use Apache 2.2. I only address the matter in hand below, this is not a guide for installing Apache. You will need to be the root user to continue.

    • This is the most important bit, you need to add the following options for building Apache to 'etc/make.conf':

    Apache24_SET += SUEXEC
    SUEXEC_DOCROOT= "/usr/local/www"

    (You may wish to set the suexec_docroot differently, my cgi-bin is directly within it, while my other web directories are on a completely different path - the FreeBSD default location for the cgi-bin is "/usr/local/www/apache24/cgi-bin")

    • Build and install Apache24 with portmaster: portmaster www/apache24. To check that the options that were added to make.conf were effective, as root, run 'rehash', then 'suexec -V', which will display the options that were applied to suexec at compile-time. If it doesn't contain the following lines, with others, then you need to start over: "-D AP_GID_MIN=300", "-D AP_UID_MIN=300", and -D AP_DOC_ROOT="/usr/local/www" (this should contain the path that you selected as your SUEXEC_DOCROOT).
    • Install and configure backuppc, if not already installed. You can configure backups later, when the web-interface is running, so you only need to have the backuppc service running at this point.
    • Configure Apache's httpd.conf, uncommenting the line 'LoadModule suexec_module libexec/apache24/mod_suexec.so', if commented. Below the lines for 'User' and 'Group' (both should be left at the default 'www' setting) add this line: 'SuexecUserGroup backuppc backuppc'. Ensure that the 'alias_module' is enabled, and that the line 'ScriptAlias /cgi-bin/ "/usr/local/www/apache24/cgi-bin"' is uncommented (if you intend to use other CGI applications then you will have to use a different location for BackupPC_Admin and adjust this guide accordingly).
    • Set up a 'Directory' section in the httpd.conf for the location that you're using, there's probably an example in the default conf file that you can modify, here's mine, I have removed 'apache24' from it to match the path to my cgi-bin directory:
    (sorry, had to start example with '[' as '<' causes it to get mangled)
    [Directory "/usr/local/www/cgi-bin">
        AllowOverride None
        Options None
        AuthType Basic
        AuthName "Backup Admin"
        AuthUserFile "/usr/local/etc/backuppc/access"
            Require valid-user
            Require ip w.x.y.z a.b.c.

    If you're not using a cgi-bin path, supported by Apache, you will need to add at least +ExecCGI into 'Options', plus probably more options. My example is using a file 'access' in the AuthUserFile line to store the login credentials for the users who will need access to BackupPC_Admin, and I'm also restricting access to it to specific IP addresses and ranges. The syntax for Apache2.2 is a bit different if you're combining access criterea - it doesn't have the 'RequireAll' directive. Note that BackupPC_Admin requires users to be authenticated by Apache if they are to have any administrative permissions, so the authentication parts are essential.

    • At this stage you are about done with the httpd.conf, so save it and run 'apachectl configtest' to check your syntax, then either 'apachectl start' or 'apachectl restart' and check that the httpd is running.
    • If you haven't already set up the 'access' file, "/usr/local/etc/backuppc/access" then do so now, using the 'htpasswd' command - if you enter it with no parameters it will display a help message.
    • Now try visiting "http://your.host.name/cgi-bin/BackupPC_Admin" and you should see an Apache authentication dialog, leading to a "500 Internal server error" message when authenticated. If you get this message without seeing any authentication dialog first then there is probably a problem with your authentication setup that you will need to remedy before you can proceed.
    • To clear the 500 error you will need to complete three further minor tasks. As root, cd to the directory that contains BackupPC_Admin. It's installed with the setuid flag set so that it would work with Perl when setuid was allowed, so you need to clear this with "chmod 554 BackupPC_Admin", then you finally need to set both this and the cgi-bin's owner and group to the backuppc daemon, thus: "chown backuppc:backuppc . BackupPC_Admin".
    • Now you should be able to access BackupPC_Admin! You need to ensure that the user that you're authenticating via Apache as has an "$Conf{CgiAdminUsers}" entry in /usr/local/etc/backuppc/config.pl, or you won't be able to do anything except look at it - if you set this while backuppc is running then you will need to restart it or reload its configuration before the change will have any effect.

    Good luck with it!

    Last edit: accesscoder 2015-09-27
  • bforpc

    bforpc - 2015-09-02

    two questions:
    Is it possible, to switch the destination directory of the backup for each host and how can be a backup encoded (because of unsecure cloud server similar)?



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks