KVM-Server Backup

1,588 views
Skip to first unread message

Sven Gehr

unread,
Apr 29, 2013, 1:47:21 PM4/29/13
to bareos...@googlegroups.com
Hi@all,

I'm new in this group ..."hello"!

I would first like to point out that my English is not very good. I (and google translator) do my best ;-)

I've used bacula but I want switch to bareos. Totay I have install my first bareos-system. The first backups run at the moment. My typical server are look like:

- KVM-Host (Ubuntu 12.04-TLS 64Bit)
- VM: Ipfire for Firewall, OpenVPN
- VM: OpenSuSE 12.2 (LDAP-Server, Samba-PDC)
- VM: CentOS 6.4 for Kolab Groupware
- VM: Windows7 Pro 64Bit (industry-apps from my customer)
- VM: SystemrescueCD (Live) for maintenance work (not in backup)

The storage-device for the vm's are an logical-volume in lvm,

A other physical host for bareos with ubuntu 12.04 LTS.

I install bareos (director, console, FD and SD) on a separate host and the FileDaemon on each client.

Is this a good strategy?

how should I proceed if a vm dies and I have to restore it?

My backup strategy is from the bacula-book.

best regards
sven

Daniel Neuberger

unread,
Apr 30, 2013, 1:09:51 PM4/30/13
to bareos...@googlegroups.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello  Sven,

that sound like solid server and  backup achritecture

At the moment there is no easy or best way to perfom a live snapshot/backup of a running kvm guest.

There are some cumbersome ways to create live backups of a kvm guest, as it is described in that link: http://kashyapc.wordpress.com/2013/01/22/live-backup-with-external-disk-snapshots-and-libvirts-blockpull/. But i did not test this anyway. So we can't give you a strategy for kvm at hand.

Maybe some one got an idea for backing up kvm guests and if there any updates we will post this on the list.

Best Regards

Daniel
- --
Daniel Neuberger                           daniel.n...@dass-it.de
dass IT GmbH                               Phone:  +49.221.3565666-95
http://www.dass-IT.de/                     Fax  : +49.221.3565666-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRB52500
GF: Stephan Dühr, Maik Außendorf, Jörg Steffens, Philipp Storz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQEcBAEBAgAGBQJRf/rfAAoJEM5obxFOj3qNsAkIAKzLnC4QztVSvFdoyVMi8ovk
2d9vA3r4RttHLXgvEq/jY2PisLV2N59EYOYTxDCezx8Ni9rOUSKOrzubncOpf09k
D/GOdJ/5Fe0ky6v81aFazRDWytdIz9E5lI4mcf89RJxPeoO/edL7Q28PnlZqXlyK
YdVKGxYp7P3Fc0gs3nI6Q9oLxNGCGXE2rR/luduoPDsc99ez/W7VFmZ9+IYE079Q
2q8Oo+CzHvTrpN8Nss6b4ydELntRXkNShfs1iFkYFSrBiO0FpqZuxXd4mAP0QpuV
fBwz8aHa00RnwvJCqgPgLx/9x3CVNy9nPAdJySwYzYVUCj504bgkarwGoDGMUp4=
=yCpD
-----END PGP SIGNATURE-----

Sven Gehr

unread,
May 3, 2013, 2:48:00 AM5/3/13
to bareos...@googlegroups.com, daniel.n...@dass-it.de
Am Dienstag, 30. April 2013 19:09:51 UTC+2 schrieb Daniel Neuberger:

> At the moment there is no easy or best way to perfom a live
> snapshot/backup of a running kvm guest.

one is not completely clear to me. I have an KVM-Guest (Windows) with install the bareos-client. My bareos do a backup from all local (fix) media in the guest.

Now the windows-machine die (sometimes happens).

how do I put this machine with my backup, restore?

> There are some cumbersome ways to create live backups of a kvm
> guest, as it is described in that link:
> http://kashyapc.wordpress.com/2013/01/22/live-backup-with-external-disk-snapshots-and-libvirts-blockpull/.
> But i did not test this anyway. So we can't give you a strategy for
> kvm at hand.

I will look at me

Daniel Neuberger

unread,
May 3, 2013, 6:27:48 AM5/3/13
to Sven Gehr, bareos...@googlegroups.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Am 03.05.2013 08:48, schrieb Sven Gehr:
> Am Dienstag, 30. April 2013 19:09:51 UTC+2 schrieb Daniel Neuberger:
>
>> At the moment there is no easy or best way to perfom a live
>> snapshot/backup of a running kvm guest.
>
> one is not completely clear to me. I have an KVM-Guest (Windows) with
install the bareos-client. My bareos do a backup from all local (fix)
media in the guest.
>
> Now the windows-machine die (sometimes happens).
> how do I put this machine with my backup, restore?
What do you mean with that statement "dies"? what exactly occured on the
vm? What is stored in the windows event logs about the "crashes"? The
machine crashes during backups or random? If the windows vm crahses
during backups, what is keept in bareos.log about that job? Or is that a
question about best practice ways to restore?

Sorry a lot of questions, but without i cant give you a clear answer.
>
>
>
>
>> There are some cumbersome ways to create live backups of a kvm
>> guest, as it is described in that link:
>>
http://kashyapc.wordpress.com/2013/01/22/live-backup-with-external-disk-snapshots-and-libvirts-blockpull/.
>> But i did not test this anyway. So we can't give you a strategy for
>> kvm at hand.
>
> I will look at me
>

- --
Daniel Neuberger daniel.n...@dass-it.de
dass IT GmbH Phone: +49.221.3565666-95
http://www.dass-IT.de/ Fax : +49.221.3565666-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRB52500
GF: Stephan Dühr, Maik Außendorf, Jörg Steffens, Philipp Storz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iQEcBAEBAgAGBQJRg5EkAAoJEM5obxFOj3qNy+kIAJtx87p1bNJZM0AMiATLczyQ
RiRSy6GxJ/7LVkTDPRPk1vA/2lvlO0VUVHioWVJVK+dWy7zlRXOyLl7be0cM5ZQN
HCIVQ8Bf92yW+55rGeCQzXo9hc4L+xuQca0ah47k25MKa2S2mJTpsxoxTnyniKSP
UPUQqWXzrMXurqEbYLZeVWsZv81BP/j1IGOqoToZHTbXQIKbpapiRsdJ4Ln9iAWF
+/BNaOir81K45HqExa1YJU+OcxIQYlzR4QQTox98tgkwZPSrJxvY30TzIms+g3Wq
rnLqfKsf8iscOV2SGIKyVdCe9czIms4XHkS9J2awp+WFgUyUlCtkj32ie1MR9LA=
=xmsn
-----END PGP SIGNATURE-----

Bruno Friedmann

unread,
May 3, 2013, 7:14:51 AM5/3/13
to bareos...@googlegroups.com
On Thursday 02 May 2013 23.48:00 Sven Gehr wrote:
> Am Dienstag, 30. April 2013 19:09:51 UTC+2 schrieb Daniel Neuberger:
> > At the moment there is no easy or best way to perfom a live
> > snapshot/backup of a running kvm guest.
>
> one is not completely clear to me. I have an KVM-Guest (Windows) with
> install the bareos-client. My bareos do a backup from all local (fix) media
> in the guest.
>
> Now the windows-machine die (sometimes happens).
>
> how do I put this machine with my backup, restore?
>
> > There are some cumbersome ways to create live backups of a kvm
> > guest, as it is described in that link:
> > http://kashyapc.wordpress.com/2013/01/22/live-backup-with-external-dis
> > k-snapshots-and-libvirts-blockpull/. But i did not test this anyway.
> > So we can't give you a strategy for kvm at hand.
>
> I will look at me


I would separate the 2 things :

Bare metal recovery :
For this one having a snapshot done of the vm (I prefer offline snapshot)
which are done on my side by a ntfsclone of the lvm where the windows reside
+ copy of the vm definition
This one could be done once per week, month depending of the need.
The restore to normal operation is the key factor of what kind of backup you
need.
This scenario cover the destroyed vm incident

Normal backup : (what's inside the vm)
Normal bareos backup jobs done in whatever kind of rotation you need.
Like any real bare machine.
This one cover the detroyed data inside the vm.
What I want to be able to restore, and how far in the past I should be able to
do it, plus in how much time I need to be fully back define the backup
scenario.


--

Bruno Friedmann

openSUSE Member
GPG KEY : D5C9B751C4653227
irc: tigerfoot

Sven Gehr

unread,
May 3, 2013, 8:46:08 AM5/3/13
to bareos...@googlegroups.com, Sven Gehr, daniel.n...@dass-it.de
Am Freitag, 3. Mai 2013 12:27:48 UTC+2 schrieb Daniel Neuberger:
> Am 03.05.2013 08:48, schrieb Sven Gehr:
> > Am Dienstag, 30. April 2013 19:09:51 UTC+2 schrieb Daniel Neuberger:


> What do you mean with that statement "dies"? what exactly occured on the
> vm? What is stored in the windows event logs about the "crashes"? The
> machine crashes during backups or random? If the windows vm crahses
> during backups, what is keept in bareos.log about that job? Or is that a
> question about best practice ways to restore?


I mean if the windows os does not boot after a crash (random) and must be reinstalled. I need long time for:

- OS-Install
- Update's
- Softwareinstall

...

I am looking for a solution that:

- Fits in my backup strategy (full -> Diff -> Incr)

When I save the vm on the KVM host I only "see" the blockdevice (lv or file) and can't backup diffs or incr.


- Fast reinstall the complete vm (os / prog / data) after a crash

Please wait briefly. I have an idea how it could work. I try that time to put together and post to.

Sven Gehr

unread,
May 3, 2013, 9:05:02 AM5/3/13
to bareos...@googlegroups.com, Sven Gehr, daniel.n...@dass-it.de
my kvm systems are constructed as follows:

The kvm-host is installed with ubuntu-server 12.04-tls. On this host I have configure a lvm with the volume group 'vmg01'. The vm's use the lv's as a block device and write their partitions in there.

from the perspective of the kvm hosts I can't determine changes on the filsystem. Only one file (or device file in case og lvm).

my idea (another vm, lvmsnapshot, bareos-sript):

My bareos run on an other host (physical). I imagine the drain as before:

1. bareos-director create the lvm-snapshots on the kvm-host

2. bareos-director start my seperate vm with mounted snapshots an installed bareos-client.

3. Bareos backup the vm-volumes (full -> diff -> incr)

4. bareos director shutdown the vm and delete the snapshots

For recovery before I go opposite. I create a new lv for the vm to restore. start my helper-vm with this blockdevice and write the last version of the filesystem in the device's.

would it be possible?

Sven Gehr

unread,
May 3, 2013, 9:12:29 AM5/3/13
to bareos...@googlegroups.com
> I would separate the 2 things :
>
> Bare metal recovery :
> For this one having a snapshot done of the vm (I prefer offline snapshot)
> which are done on my side by a ntfsclone of the lvm where the windows reside
> + copy of the vm definition

> This one could be done once per week, month depending of the need.
> The restore to normal operation is the key factor of what kind of backup you
> need.
> This scenario cover the destroyed vm incident


> Normal backup : (what's inside the vm)
> Normal bareos backup jobs done in whatever kind of rotation you need.
> Like any real bare machine.
> This one cover the detroyed data inside the vm.
> What I want to be able to restore, and how far in the past I should be able
> to
> do it, plus in how much time I need to be fully back define the backup
> scenario.

I'm trying to find a way to realize this in a scenario

Reply all
Reply to author
Forward
0 new messages