compressing dd backup on the fly

Posted by Phil on Server Fault See other posts from Server Fault or by Phil
Published on 2009-08-10T13:50:35Z Indexed on 2013/10/17 16:04 UTC
Read the original article Hit count: 246

Filed under:
|
|

Maybe this will sound like dumb question but the way i'm trying to do it doesn't work.

I'm on livecd, drive is unmounted, etc.

When i do backup this way

sudo dd if=/dev/sda2 of=/media/disk/sda2-backup-10august09.ext3 bs=64k

...normally it would work but i don't have enough space on external hd i'm copying to (it ALMOST fits into it). So I wanted to compress this way

 sudo dd if=/dev/sda2 | gzip > /media/disk/sda2-backup-10august09.gz

...but i got permissions denied. I don't understand.

© Server Fault or respective owner

Related posts about linux

Related posts about backup