Backing up LVs

Alexander Skwar listen at alexander.skwar.name
Sun Aug 6 13:42:12 UTC 2006


ยท Gabriel M Dragffy <dragffy at yandex.ru>:

> On Sun, 2006-08-06 at 08:57 +0200, Alexander Skwar wrote:
> 
>> > they boot CD can also handle Reiserfs partitions. It makes an exact
>> > copy/image of a partition.
>> 
>> Like dd? Or rather like partimage?
> 
> Actually I have never really used the dd command to more than a basic
> level and I'm not exactly sure of what it is capable of.

It creates a bit wise copy of the Input File, possibly converting
it. Hence the name: Copy & Convert, or short: dd.

> I did read it's 
> man page but on this occasion was non-too enlightened. TrueImage will
> create a single file image of a drive and this image is also compressed.

Output of dd isn't compressed - but there's no need for dd to
compress the output. Just pipe the output to some compression
program: "dd | bzip2".

> TrueImage saves further space by, for example, when backing up windows
> excluding the hiberfil.sys file and swap files which together may occupy
> 1gb+ of space but are completely unnecessary.

Fine.

> Is dd able to make a slightly compressed backup?

No, as explained above. But actually, I'd rather suggest to use
partimage to make images, as partimage knows the filesystem and
then only copies those blocks, which contain data. Ie. an image
of a 10gb "partition" where only 1mb is used, will be about 1mb
("about", as I suspect some overhead).

partimage takes an image of ANY block device. Thus I'd use it
in combination with LVM snapshots.

> I say slightly 
> compressed because I don't want to wait hours while the computer tries
> to compress 3gb of files that won't compress well even under high
> compression.

If you're after *fast* compression, then I'd suggest to use lzop
instead of bzip2 as a compressor - I'd suggest to NOT use gzip,
as a gzip compressed file will *completely* break, when one bit
is faulty. Not so with bzip2 (don't know about lzop).

Most of the time you'll get the best "compression" with partimage,
though. And it'll be fastest. partimage also supports On-The-Fly
compression (with a gzip alg., I suppose).

Alexander Skwar
-- 
Wer Berlin zur neuen Hauptstadt macht, schafft geistig ein neues
Preussen.
                -- Konrad Adenauer






More information about the ubuntu-users mailing list