tools

Home » tools » Free software » Backuppc-lvm

Backuppc-lvm

Backuppc-lvm is a BackupPC addon to backup LVM partitions using snapshots.

This product is a BackupPC add-on meant to simplify the backup of an LVM partition, exploiting the snapshot feature of LVM. It is useful for the backup of virtual hosts stored in LVM partitions.

See also the documentation at the sourgeforge project wiki.

Description

The use case of this BackupPC add-on is the backup of virtual hosts stored in the logical volumes of a virtualization server.

This software has been tested on XEN and KVM servers, and it has been run in production environments.

Backuppc-lvm - general schema

Fig. 1: The main concept: virtual hosts backup.

While doing backups of virtual servers, there are typically two critical requirements:

  1. to have almost zero downtime for the services running on the virtual machine (suppose that the machine is a web server or a database server);
  2. the backup must be done syncing the file system in a consistent status; a typical example is a database server that must be copied when the processes are idle, the cache is flushed and there is no stale data around.

These two requirements are conflicting: stopping the critical processes for the time required by the backup is likely to cause a long downtime of the services.

This BackupPC add-on helps you in solving this problem, by leveraging on the snapshot features of LVM. The scripting framework will quickly take a snapshot of the virtual machines in idle status and, while the services become up again, the backup system can take a backup of the frozen snapshot system safely.

At the end of the process we will have a backup of any virtual machine with a service downtime of the order of few seconds.

What it does

The LVM system includes a snapshot feature that can provide a frozen image of a logical volume at some moment in time. The snapshot volume can be quickly created and basically it is not "disk hungry" (it grows as much as the original volume, and only when there is a change).

The idea is that the BackupPC server calls the main script on the virtualization server before performing a backup of the virtual host (V1 in fig. 2) ("DumpPreUserCmd" call). The script prepares a snapshot (LV1 snapshot in fig. 2) of the volume relative to the virtual host (LV1 in fig. 2).

Then the server can safely pull the backup data. Next, the BackupPC server invokes again the main scripts on the virtualization server in order to clean the snapshot.

Backuppc-lvm - detailed schema

Fig. 2: A functional schema of the backuppc-lvm package

(see text above for the description).

In this way it is possible to launch custom scripts to stop critical services in the virtual host, before the backup takes place.

Download

You can obtain the Backuppc-lvm debian package using our public Debian repository: http://debian.biodec.com .

Execute the following commands in order to enable our repository on your Debian system:

sudo wget http://bioinformatics.biodec.com/tools/software/biodec.list \
-O /etc/apt/sources.list.d/backuppc-lvm.list
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 628E1F7BF79C26AA
sudo gpg --armor --export 628E1F7BF79C26AA | apt-key add -
sudo aptitude update

..then you can install or download the package:

# SHOW ME THE PACKAGE DESCRIPTION
aptitude show backuppc-lvm

# DOWNLOAD THE PACKAGE
aptitude download backuppc-lvm

# INSTALL BACKUPPC-LVM
sudo aptitude install backuppc-lvm

Note for wheezy users: the package is the same either for squeeze and for wheezy.

Copying

Copyright (c) 2009-2014 BioDec S.r.l.All Rights Reserved.

Backuppc-lvm is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.