Can anyone please help...
I have 2 ways of backing up a drive (with the output split) to a drive on a network:-
- Code: Select all
Method A)
----------
dd bs=16M if=/dev/hda | gzip -c | split -b 256m - \ \mnt\nwdrive\bak.img.gz.
gives portions of a gzipped hard drive in \mnt\nwdrive\bak.img.gz.*
- Code: Select all
Method B)
----------
dd bs=16M if=/dev/hda | split -b 256m - \mnt\nwdrive\bak.img.
gzip \mnt\nwdrive\bak.img.*
gives gzipped portions of a hard drive in bak.img.*.gz
However all intermediate back.img.* files are written to disk so need the space to hold them all. I don't have the space locally or on the network drive.
Method A) is the more usual way, it gzips the entire drive and then splits the output.
Method B) splits the dd of the entire drive then gzips those splits.
I prefer Method B) but I am limited on space and bandwidth.
Are there any obvious way of achieving the same thing as B) but not having to use all that space by varying parameters to dd or doing some bash scripting? Somehow I need to create and gzip one split at a time.
If at all possible I would prefer to stick to these tools plus the shell, I am not interested in G4U, ghost, etc.
Thanks for any constructive help given.
Hal.