open source

Enterprise-class Backups in the Open Source Arena

1474 VIEWS

· ·

In enterprise businesses, there will often be complex, expensive backup solutions in place that are out of reach monetarily for those in SMBs and at home—in which case they can either choose to develop a bunch of scripts that work to backup their systems, or take advantage of open source tools that make backups easy. One such tool is BackupPC (http://backuppc.sourceforge.net/)

Below, I’ll explain how BackupPC works and how to get started using it on Ubuntu.

Objectives

  1. Explain key benefits of BackupPC
  2. Set up BackupPC on an Ubuntu server
  3. Browsing to the web interface
  4. Explain how to backup a server /PC from your new BackupPC server

Key benefits

  1. BackupPC has a clever pooling scheme that minimises disk storage and disk I/O- Identical files across multiple backups of the same remote system. They are stored only once using hard links, resulting in substantial savings in disk storage and disk writes.
  2. The web interface allows current status views, configuration edits, host add/delete, log file views, and lets users initiate and cancel backups and browse and restore files from backups.
  3. BackupPC is completely open source.
  4. Single files can be downloaded directly from the web interface.

Setting up BackupPC

For the purposes of this article, I’m going to assume that you have an Ubuntu 16.04 server ready to install BackupPC on.

Start by running apt-get update to fetch all the latest repository information. Once you have done that, run apt-get install backuppc and select ‘Yes’ to install BackupPC and its dependencies.

When prompted, leave the default Postfix configuration selected like so:

After pressing ‘OK,’ set the hostname in the text box. Then choose to have the BackupPC installer configure Apache like so:

The final part of the setup will output the hostname, username and password for your new BackupPC installation. Make a note of these so you can log in to the web interface.

Once the setup has completed, run service apache2 restart to activate the new configuration.

Connecting to the BackupPC web interface

To connect to the BackupPC web interface, make a note of the IP address of your server or use its DNS name if there is a DNS set for it. At this point, you can browse to the web interface in your favorite browser and log in with the details you made a note of earlier.

Backing up a remote computer

There are numerous methods you can use to back up your remote server/PC, but for the purposes of this article, we will focus on using SSH. You will need to log in to your BackupPC server over SSH and create an SSH keypair which will be used to back up remote Linux servers. To do this, log in and change to the BackupPC user by typing su – backuppc. Now type ssh-keygen -t rsa and accept all the defaults. Now you’ll need to take the public part of the key and place it on the server you wish to back up by typing cat /var/lib/backuppc/.ssh/id_rsa.pub. Simply take this key, place it in the ‘authorized_keys’ file of the remote SSH user, and you’re good to go. You will need to SSH from the BackupPC server under the BackupPC user to the remote server you wish to back up after adding the public key, so that you can add the remote identification information locally.

After you have done the above, you can simply add the remote server in the BackupPC web interface by clicking on ‘Edit Hosts’ (down the left-hand side), then ‘Hosts’ along the top. Then click the ‘Add’ button, at this point choosing to place the hostname in the correct text field along with the username in its relevant field. Then click ‘Save.’ You will now find the new server under ‘Host Summary’ where you can edit its config and choose which paths you’d like to back up, along with set retention policies and many other features!

Conclusion

BackupPC is an excellent choice for those who are strapped for cash or simply believe they don’t need to spend big money on an enterprise backup solution. Personally, I have had lots of success using BackupPC—both in SMBs and enterprise environments.


Keith Rogers is an IT professional with over 10 years’ experience in modern development practices. Currently he works for a broadcasting organization in the DevOps space with a focus on automation.


Discussion

Click on a tab to select how you'd like to leave your comment

Leave a Comment

Your email address will not be published. Required fields are marked *