From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Laukamp Subject: Re: [User Question] How to create a backup of an LVM based maschine without wasting space Date: Fri, 12 Oct 2012 17:51:30 +0200 Message-ID: <50783C82.70500@laukamp.me> References: <5077BE30.5010209@laukamp.me> <20121012084221.GC14822@stefanha-thinkpad.redhat.com> <5077DB9F.6050809@laukamp.me> <5077E03E.2040507@laukamp.me> <5077EDEB.6050703@laukamp.me> <5077F600.7080809@laukamp.me> <5078044D.1080904@laukamp.me> <507814ED.5060001@laukamp.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Stefan Hajnoczi , kvm@vger.kernel.org To: Javier Guerra Giraldez Return-path: Received: from mailer0.lippux.de ([5.9.218.245]:49628 "EHLO mailer0.lippux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933028Ab2JLPvg (ORCPT ); Fri, 12 Oct 2012 11:51:36 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Am 12.10.2012 16:36, schrieb Javier Guerra Giraldez: > On Fri, Oct 12, 2012 at 9:25 AM, Stefan Hajnoczi wrote: >> I would leave them raw as long as they are sparse (zero regions do not >> take up space). If you need to copy them you can either convert to >> qcow2 or use tools that preserve sparseness (BTW compression tools are >> good at this). > note that free blocks previously used by deleted files won't be > sparse, won't be zero and won't be much reduced by compression. > > i'd say the usual advice stays: > > A: if you run any non-trivial application on that VM, then use a real > network backup tool 'from the inside' of the VM > B: if real point-in-time application-cache-storage consistency is not > important, then you can: > > - make a read-write LVM snapshot > - mount that and fsck. (it will appear as not-cleanly unmounted) > - backup the files. (i like rsync, especially if you have an > uncompressed previous backup) > - umount and destroy the snapshot > - optionally compress the backup > > > but seriously consider option A before. especially important if you > run any DB on that VM > I already thought about such situations. So DB systems are a real problem. I know that some data can be better backup directly but for example a VM for a Web- or Mailserver I want to backup completely to get this services get to work again very fast if there are problems. So it's a complex problem I think and not every machine can be backuped as another. I think that I must start by the hardware and software configuration of the backup node. Best Regards