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:

    Code
    sudo apt-get -y install backuppc


    For Krazelic:

    Code
    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.

    Code
    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:


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

    Code
    sudo a2ensite backuppc


    Open a browser and goto http://<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:


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

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


    Open a browser and goto http://<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.

    Code
    cd /media/<someridiculouslylongfoldernamewhereyouwantbacckuppctobe>
    sudo mkdir backuppc && sudo chown backuppc:backuppc backuppc


    Stop BackupPC

    Code
    sudo service backuppc stop


    Login as the backuppc user to copy the cpool and hardlinks

    Code
    sudo su - backuppc
    cd backuppc
    mkdir pc
    cp -a /var/lib/backuppc/* .
    cd pc
    ./usr/share/backuppc/bin/BackupPC_tarPCCopy /var/lib/backuppc/pc | tar xvPf -
    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.

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


    Start BackupPC

    Code
    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 http://<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: http://backuppc.sourceforge.ne…Other-installation-topics


    6. Sources
    http://backuppc.sourceforge.net/faq/BackupPC.html
    https://github.com/Zloy/backup…/sites-available/backuppc
    https://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: http://www.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. :)

  • Hello all,


    For Windows users I also would like to mention this project I found on SourceForge: http://sourceforge.net/project…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: https://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: http://diantokam.blogspot.com/…-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 http://www.backupcentral.com/p…ling-lists-3/backuppc-21/ or the BackupPC Mailing List Archives http://sourceforge.net/p/backuppc/mailman/backuppc-users/

  • 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

    Edited once, 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.

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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!