Menu

Home

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
Server status screen
Screenshot thumbnail
Host summary screen


Project Members:


Discussion

  • 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.
    THANK YOU

     

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

    Joanna - 2015-01-28

    hello,

    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???
    Please!!!

     
  • 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_GIDMIN= 300
    SUEXEC_UIDMIN= 300
    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"
        <RequireAll>
            Require valid-user
            Require ip w.x.y.z a.b.c.
        </RequireAll>
    </Directory>
    

    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

    Hi,
    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)?

    bfo

     
  • MJ Storm

    MJ Storm - 2019-03-29

    Hi,

    Using backuppc 4.2.1 and it is only backing up the folder structure, fresh installl tried fedora 27-29 and all the same. no error, if i check the backup info, see's the files say's they were backuped up but when i check the folders there are no files in any folder.

    Been looking on line for the past several days, can find nothing. have any idea's on what i might have done wrong. same setup with fedora 24 and backuppc 3.2 works fine.

     
    • Craig Barratt

      Craig Barratt - 2019-04-07

      MJ,

      I'm not sure where you posted this request to. Please send user questions
      to the user mail list, backuppc-users@lists.sourceforge.net.

      Thanks,
      Craig

      On Fri, Mar 29, 2019 at 11:47 AM MJ Storm storm134@users.sourceforge.net
      wrote:

      Hi,

      Using backuppc 4.2.1 and it is only backing up the folder structure, fresh
      installl tried fedora 27-29 and all the same. no error, if i check the
      backup info, see's the files say's they were backuped up but when i check
      the folders there are no files in any folder.

      Been looking on line for the past several days, can find nothing. have any
      idea's on what i might have done wrong. same setup with fedora 24 and
      backuppc 3.2 works fine.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/backuppc/wiki/Home/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • RodyMens

    RodyMens - 2020-11-16

    Hi, I am relatively new to Git. Does BackupPc also work for Windows?
    I read Windows on the following page: https://backuppc.github.io/backuppc/
    But I can only seem to find tar.gz files which I can not execute in Windows.
    Thank you in advance!

     
  • Timo Lehikoinen

    Timo Lehikoinen - 2022-11-08

    I have used BackupPC for several years already. Now I am facing a peculiar phenomena: Automatic backups always fail saying "SSH Timeout" on one Windows PC, but running the same command (I copied it from the log-file) as user backuppc always succeeds. And this is happening only with one of my hosts.
    Any ideas?

    BR,
    Timo

     
  • Justin Magers

    Justin Magers - 2024-10-02

    I have BackupPC running in a docker instance on a host (hostname backup). BackupPC fails to ping a particular backup host (backmeup.attlocal.net):

    2024-10-01 17:00:15 no ping response from backmeup.attlocal.net
    2024-10-01 17:00:15 can't ping backmeup.attlocal.net (client = backmeup); exiting
    

    However, if I run the gethostbyname() method inside the docker instance, it seems to work. It should be noted that backmeup.attlocal.net is a host with DHCP = 0.

    $ sudo docker exec -it backuppc perl -e 'print(gethostbyname("backmeup.attlocal.net") ? "ok\n" : "not found\n");'
    ok
    

    I can successfully ping backmeup.attlocal.net from outside the docker containier (i.e. from host backup):

    $ ping -v -c 1 backmeup.attlocal.net
    ping: sock4.fd: 3 (socktype: SOCK_RAW), sock6.fd: 4 (socktype: SOCK_RAW), hints.ai_family: AF_UNSPEC
    
    ai->ai_family: AF_INET, ai->ai_canonname: 'backmeup.attlocal.net'
    PING backmeup.attlocal.net (192.168.1.254) 56(84) bytes of data.
    64 bytes from homeportal (192.168.1.254): icmp_seq=1 ident=35135 ttl=62 time=794 ms
    
    --- backmeup.attlocal.net ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 794.477/794.477/794.477/0.000 ms
    

    But I cannot ping the host from inside the docker container:

    $ sudo docker exec -it backuppc ping -v -c 1 backmeup.attlocal.net
    ping: sock4.fd: 3 (socktype: SOCK_DGRAM), sock6.fd: 4 (socktype: SOCK_DGRAM), hints.ai_family: AF_UNSPEC
    
    ping: backmeup.attlocal.net: Try again
    

    I can also ping the host backmeup.attlocal.net using it's IP address from inside the docker container:

    $ sudo docker exec -it backuppc ping -v -c 1 192.168.1.99
    ping: sock4.fd: 3 (socktype: SOCK_DGRAM), sock6.fd: 4 (socktype: SOCK_DGRAM), hints.ai_family: AF_UNSPEC
    
    ai->ai_family: AF_INET, ai->ai_canonname: '192.168.1.99'
    PING 192.168.1.99 (192.168.1.99) 56(84) bytes of data.
    64 bytes from 192.168.1.99: icmp_seq=1 ttl=125 time=906 ms
    
    --- 192.168.1.99 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 905.745/905.745/905.745/0.000 ms
    

    Host backmeup.attlocal.net is a Windows 11 host. I am able to ping other Windows 11 hosts and linux hosts normally.

    Does anyone know what might be causing this or how to troubleshoot?

     

Log in to post a comment.