Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: How can I rewrite all empty sectors with zeros?
Date: Mon, 23 Jul 2012 20:06:32
Message-Id: jukaj2$s0p$1@dough.gmane.org
In Reply to: Re: [gentoo-user] Re: How can I rewrite all empty sectors with zeros? by Jarry
1 On 23/07/12 19:24, Jarry wrote:
2 > On 23-Jul-12 16:29, Nikos Chantziaras wrote:
3 >> On 22/07/12 20:18, Jarry wrote:
4 >>> Hi,
5 >>> I want to backup my whole hard-drive (8 partitions) with:
6 >>> # dd if=/dev/sda | gzip > /path/image.gz
7 >>>
8 >>> In order to achieve good compression level I'd like to wipe
9 >>> out all empty space with zeros. How can I do that?
10 >>
11 >> That's the wrong way to do it. You should use a tool that only copies
12 >> the data, and then also backup the partition table.
13 >>
14 >> Or use partimage/clonezilla like Neil mentioned which does all that
15 >> automatically.
16 >
17 > I know those tools. Unfortunatelly, they do not support
18 > "smart copying" (only used sectors) if software raid is used.
19 >
20 > So I'm back on the beginning: I can clone only the whole
21 > drive (all sectors). No matter if I use dd, clonezila or
22 > partimage...
23
24 There's good ol' tar too :-) I usually use that one, or rsync if I need
25 to clone rather than back-up and compress. Those two have never let me
26 down yet.