BackupPC Install Guide

    • BackupPC Install Guide

      Hello All,

      This guide will walk you through setting up BackupPC on OMV Kralizec and Sardaukar. This guide is provided as-is.
      There is no plan to make it a plugin for OMV. The steps provided will setup BackupPC as a virtual host. We will move
      the backup location so it does not use /var/lib/backuppc.

      1. Install the BackupPC package. For Krazelic we will add the apapche2-utils for the htpasswd tool and we add the fcgiwrapper to add cgi support for nginx.
      During the install of BackupPC, DO NOT select to auto configure apache2.
      For Sardaukar:

      Source Code

      1. sudo apt-get -y install backuppc

      For Krazelic:

      Source Code

      1. sudo apt-get -y install backuppc apache2-utils fcgiwrapper


      2. Create a user in the htpasswd file for authentication. In this example we will use backuppc. Enter your desired password when prompted.

      Source Code

      1. sudo htpasswd /etc/backuppc/htpasswd backuppc


      3. Create the web configuration file. We will be running BackupPC as a virtual host using port 81.
      For Sardaukar:

      Source Code

      1. <VirtualHost *:81>
      2. ServerName backuppc
      3. UseCanonicalName Off
      4. DirectoryIndex index.cgi
      5. ServerSignature Off
      6. DocumentRoot /usr/share/backuppc
      7. ErrorLog ${APACHE_LOG_DIR}/backuppc_error.log
      8. CustomLog ${APACHE_LOG_DIR}/backuppc_access.log combined
      9. <Directory "/usr/share/backuppc/cgi-bin/">
      10. Options +ExecCGI -Indexes +FollowSymLinks -SymLinksIfOwnerMatch -Includes +MultiViews
      11. Addhandler cgi-script .cgi .pl
      12. AllowOverride AuthConfig Indexes Limit Options
      13. </Directory>
      14. Alias /backuppc "/usr/share/backuppc/cgi-bin/"
      15. </VirtualHost>
      Display All

      Using your desired editor, save this file to /etc/apache2/sites-available/backuppc
      Enable the site

      Source Code

      1. sudo a2ensite backuppc

      Open a browser and goto <your omv host name or ip>:81/backuppc and you should be promted to login. Use backuppc and the password you set. If all went well
      then the BackupPC page should appear.

      For Kralizec:

      Source Code

      1. server {
      2. listen 81;
      3. server_name omv-backuppc;
      4. access_log /var/log/nginx/backuppc.access_log;
      5. error_log /var/log/nginx/backuppc.error_log;
      6. root /usr/share/backuppc/cgi-bin;
      7. location /backuppc {
      8. auth_basic "BackupPC admin";
      9. auth_basic_user_file /etc/backuppc/htpasswd;
      10. alias /usr/share/backuppc/cgi-bin/;
      11. index /index.cgi;
      12. }
      13. location ~\.cgi$ {
      14. gzip off;
      15. include /etc/nginx/fastcgi_params;
      16. fastcgi_pass unix:/var/run/fcgiwrap.socket;
      17. fastcgi_index BackupPC_Admin;
      18. fastcgi_param SCRIPT_FILENAME /usr/share/backuppc/cgi-bin$fastcgi_script_name;
      19. }
      20. }
      Display All

      Using your desired editor, save this file to /etc/nginx/sites-available/backuppc
      Enable the site

      Source Code

      1. sudo ln -s /etc/nginx/sites-available/backuppc /etc/nginx/sites-enables/backuppc && sudo service nginx reload

      Open a browser and goto <your omv host name or ip>:81/backuppc and you should be promted to login. Use backuppc and the password you set. If all went well
      then the BackupPC page should appear.

      4. Move the backup location to the storage mounted with OMV. I decided not to use the web interface to make the destination folder. You may do so if you desire. I have not tested it using the
      web interface though. I merely did it this way for simplicity. I'll have to test it out later using the web interface. Let's make the new folder for your backups to reside in.
      Replace <someridiculouslylongfoldernamewhereyouwantbacckuppctobe> with the correct name on your system.

      Source Code

      1. cd /media/<someridiculouslylongfoldernamewhereyouwantbacckuppctobe>
      2. sudo mkdir backuppc && sudo chown backuppc:backuppc backuppc


      Stop BackupPC

      Source Code

      1. sudo service backuppc stop


      Login as the backuppc user to copy the cpool and hardlinks

      Source Code

      1. sudo su - backuppc
      2. cd backuppc
      3. mkdir pc
      4. cp -a /var/lib/backuppc/* .
      5. cd pc
      6. ./usr/share/backuppc/bin/BackupPC_tarPCCopy /var/lib/backuppc/pc | tar xvPf -
      7. exit


      Now let's rename the old directory to keep it as a backup and symlink to the new location. Replace <someridiculouslylongfoldernamewhereyouwantbacckuppctobe> with the correct name on your system.

      Source Code

      1. sudo mv -f /var/lib/backuppc /var/lib/backuppc.save
      2. sudo ln -s /media/<someridiculouslylongfoldernamewhereyouwantbacckuppctobe>/backuppc /var/lib/backupppc


      Start BackupPC

      Source Code

      1. sudo service backuppc start

      If all went well BackupPC should start normally. If you get a "failed to start" then check the permissions on the backuppc folder. It should match the permissions of the /var/lib/backuppc.save folder.
      A quick and dirty way to fix this is to sudo chmod -R 775 the backuppc folder.

      5. Time to configure! :)
      Open a browser and goto <your omv host name or ip>:81/backuppc and you should be promted to login. Use backuppc and the password you set. If all went well
      then the BackupPC page should appear. You are now ready to use BackupPC.

      I would suggest removing the localhost configuration in BackupPC since it would be useless if the system crashes. Check the OMV forums on how to backup OMV configuration for Sardaukar. Kralizec has a plugin to
      backup the configuration from the OMV-Extras repository. I would suggest using this instead. More information about removing localhost can be found here: backuppc.sourceforge.net/faq/B…Other-installation-topics

      6. Sources
      backuppc.sourceforge.net/faq/BackupPC.html
      github.com/Zloy/backuppc_on_ng…/sites-available/backuppc
      wiki.debian.org/nginx/FastCGI

      7. Notes
      Here are some thoughts and opinions about this guide. I prefer use the rsync plugin in OMV. It is easy to use and to setup jobs.
      BackupPC is a little more complex and is for more advanced users in my opinion. If you have Windows clients you can use the built-in backup agent or other 3rd party tools
      to save the backups to a SMB/CIFS share. You can also use rsync on Windows. See this article from rsync.net: rsync.net/resources/howto/windows_rsync.html
      So before using this guide, consider what you want to accomplish by using BackupPC. I am by no means putting down BackupPC. I have used it in the past and still do in certain environments.
      This is just my opinion and your welcome to share your thoughts on BackupPC. :)
      ShadowZero -- OMV Fan since 0.3
    • Re: BackupPC Install Guide

      Hello all,

      For Windows users I also would like to mention this project I found on SourceForge: sourceforge.net/projects/backu…es/cygwin-rsyncd/3.0.9.0/ It's worth taking a look at if you would like to use rsyncd. I prefer to used rsyncd myself over smb/cifs. For Debian/Ubuntu users take a look at this Wiki article: help.ubuntu.com/community/rsync#Rsync_Daemon. These instructions are also similar for Fedora/CentOS based systems. Take a look at this blog post for those OSes: diantokam.blogspot.com/2012/11…-daemon-on-centos-62.html These steps should also work for current releases.

      If you have problems with your backups always check the logs for your hosts having issues. They will help you determine what is causing the problem. If your still having problems, I recommend looking at Backup Central Forums backupcentral.com/phpBB2/two-w…ling-lists-3/backuppc-21/ or the BackupPC Mailing List Archives sourceforge.net/p/backuppc/mailman/backuppc-users/
      ShadowZero -- OMV Fan since 0.3
    • Thanks for your guide! It worked pretty well, although I think there are 2 small mistakes:
      1) On Debian Wheezy (Kralizec) the package fcgiwrapper was not available, instead I used fcgiwrap.
      2) For the Apache configuration, the line "Listen 81" appears to be missing.

      When backing up Linux clients with BackupPC, I found this guide to be very helpful.

      Edit: After my installation I faced two different errors, here are the solutions:
      1) File::RsyncP module doesn’t exist
      2) Can't call method "getStats" on an undefined value
      ESXi: SM X9SCA-F || Xeon E3-1220LV2 || Kingston ECC 16GB DDR3-1333 || 2x IBM M1015 (IT) || 38TB raw || Chenbro SR11269

      The post was edited 1 time, last by T-A-Z ().

    • I have decided to drop this project. There are plenty of other methods that are more up to date to perform backups. For Windows clients, use the backup utility and point it to a CIFS (Samba) share. For Linux clients, there are many options such as rsync to back up your data. Overall, for personal use you can backup your devices easily without BackuPC. If you need help/suggestions for performing backups, please let me know. I will do my best to help answer your questions. I will consider this thread now closed. I will not respond to new posts here. I am open to new threads on how to perform backups. Please do not PM me.
      ShadowZero -- OMV Fan since 0.3
    • Awww...sorry to read this, "...drop the project". Though there are " plenty of other methods that are more up to date to perform backups", the incredibly efficient use of storage via compression and pooling sets BackupPC apart from the other solutions. I appreciate the guide here, and will be using it to make my OMV also my backup appliance. Thank you for your effort anyway.
    • OMV now supports Docker and there are good Dockers for BackupPC, so it should be even easier to make a working solution now without the need for mucking with OMV itself.

      EDIT: Update to this. So I have been using this (2devnull/docker-backuppc) BackUPPC Docker image for over a week now and it is working perfectly. It is a fork of ktwe/docker-backuppc

      The post was edited 1 time, last by 2devnull ().