[Gllug] Splitting files at 2GB barrier

Richard Cottrill richard_c at tpg.com.au
Fri Jan 26 13:02:14 UTC 2007


Hi guys,
 
I'm trying to backup a disk image to a device that cuts files at 2GB. In
this case I've booted to a Live CD, so /dev/hda is not mounted. My first try
was:

for i in 1 2 3 4 5 6 7 8 9 ; do
    gzip --best | dd of=<mounted smb share>/image.part${i}.gz obs=1000000
count=2000 ;
done < cat /dev/hda

Then re-imaging:

zcat =<mounted smb share>/image.part1.gz <mounted smb share>/image.part2.gz
... (depending on the number of non-empty gz files) | dd of=/dev/hda

cat seemed to be essential... I know it's not good form. In general though,
this didn't work. Aside from creating a number of junk/pseudo-empty files
when it runs out of data, the image doesn't seem consistent. In addition, it
seems to cut the files at 1GB, rather than 2GB (I could just fiddle the
numbers - but it's odd). Please lets not argue about MiB vs. MB...
 
There are plenty of problems here, and I'm hoping that this can turn into on
of those handy discussions on shell scripting that make Google so handy :)
In addition, if I can figure out how to backup whole disk images to my Slug
(the otherwise handy device in question) then I'd be very appreciative.
 
I looked at GNU tar's tape splitting options, but I couldn't figure out how
to get it to accept all the options needed at once (I may very well be
stupid).
 
Thanks,
 
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20070126/b0f0207b/attachment.html>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list