basic dd | gzip question

Soldato
Joined
22 Dec 2008
Posts
10,369
Location
England
Hey guys. Whether its archaic or not, I use dd to backup partitions. For preferance I pipe it through gzip, so using a command themed on

dd if=/dev/sda1 sync=conv,noerror | gzip -c > /mnt/disk/sda1.img.gz

Which works well. But I cant mount it without extracting it first, and this is inconvenient. It leads to making backups just using dd, which I mount using -o loop. This is also inconvenient.

So is there a way of copying the partition, using compression, and mounting the file later on if I need to add files to or remove them from it?

Perhaps I'm just being thick, but I don't seem to get it. Something along the lines of gzip | mount perhaps

I hope the above makes sense, I'm evidently not very good with linux yet.
 
Oh. gunzip -c file.img.gz mount ... or gunzip -c file.img.gz | mount?

That might need to be a different letter than c, but I think I get the idea. Is the pipe needed?

Fuze is a good idea but altogether more complicated than what I'm looking for, going for the bare minimum here on the basis that it's the simplist tools that break last
 
Back
Top Bottom