1 |
On Mon, Jul 23, 2012 at 10:29 AM, Nikos Chantziaras <realnc@×××××.com>wrote: |
2 |
|
3 |
> On 22/07/12 20:18, Jarry wrote: |
4 |
> |
5 |
>> Hi, |
6 |
>> I want to backup my whole hard-drive (8 partitions) with: |
7 |
>> # dd if=/dev/sda | gzip > /path/image.gz |
8 |
>> |
9 |
>> In order to achieve good compression level I'd like to wipe |
10 |
>> out all empty space with zeros. How can I do that? |
11 |
>> |
12 |
> |
13 |
> That's the wrong way to do it. You should use a tool that only copies the |
14 |
> data, and then also backup the partition table. |
15 |
> |
16 |
> Or use partimage/clonezilla like Neil mentioned which does all that |
17 |
> automatically. |
18 |
> |
19 |
|
20 |
For my part, I found compressing all files using squashfs to be most |
21 |
useful, specially for backups as restoring single files vs all files is |
22 |
just as simple. |
23 |
Also, using the squashfs archive as read-only base of a unioned mount |
24 |
(aufs, unionfs) is also a very useful trick. |
25 |
|
26 |
As my systems are all setup the same, I never backup the partition table |
27 |
and recreate it each time (easy, and I often change the partition layout |
28 |
anyway). |
29 |
|
30 |
Simon |