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.
 
I would go down the route of using a virtual file system, i.e FUSE.

Just had a quick look, and theres a fair few projects which use FUSE to allow mounting of gzip'ed files, so you can mount and trasparently read/write to the backup transparently without worrying about the compression.

The project I found is called AVFS, see here: http://avf.sourceforge.net/

Heres a list of lots of FUSE projects related to virtually mounting archive formats: http://sourceforge.net/apps/mediawiki/fuse/index.php?title=ArchiveFileSystems

Sure there is something there that can do what you want.

EDIT: the official fuse.gunzip looks good as well: http://fuse.gunzip.silverice.org/
 
Last edited:
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.

Erm I don't quite get what you want. If you gzip the output of dd, and then want to mount it, you'd use gunzip -c <gzipped iso> then a mount command
 
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