1 |
On Sunday 22 Jul 2012 18:45:50 Alex Schuster wrote: |
2 |
> Jarry writes: |
3 |
> > I want to backup my whole hard-drive (8 partitions) with: |
4 |
> > # dd if=/dev/sda | gzip > /path/image.gz |
5 |
> > |
6 |
> > In order to achieve good compression level I'd like to wipe |
7 |
> > out all empty space with zeros. How can I do that? |
8 |
> |
9 |
> You can create files containing only zeros on all partitions until |
10 |
> they are full. Like this: |
11 |
> |
12 |
> for i in 5 6 7 8 9 10 11 12 |
13 |
> do |
14 |
> mount /dev/sda$i /mnt |
15 |
> dd if=/dev/zero of=/mnt/zero |
16 |
> rm /mnt/zero |
17 |
> umount /mnt |
18 |
> done |
19 |
> |
20 |
> Wonko |
21 |
|
22 |
Only to add that using bs=4096 or bs=2048 would help this take less than a |
23 |
week waiting for it to finish. :-) |
24 |
-- |
25 |
Regards, |
26 |
Mick |