-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At some point hitherto, Tom Rauschenbach hath spake thusly:
> I have a filesystem that is 39389776 1k blocks.  Obviously too big to back up 
> on a single CD.  I'd like to cut it up into separate file systems that can be 
> backed up on CD.
> 
> Does anyone know of a clever/fast/convenient way to do this?

Well, what you're asking can't be done without actually copying the data onto
those other (pre-existing) filesystems that you're talking about, but
the good news is it doesn't need to be, at least if I understand you correctly.

Presumably, you have a bunch of directories under the filesystem, such
as in my /usr/local partition:

  drwxrwsr-x    5 ddm      ddm           512 Feb  9 05:46 Download/
  drwxr-xr-x    2 root     root          224 Oct  6 02:16 bin/
  drwxr-xr-x    3 root     root           72 Sep  7 07:47 doc/
  drwxr-xr-x    2 root     root          104 Sep  7 07:47 etc/
  drwxr-xr-x    2 root     root           48 Feb  6  1996 games/
  drwxr-xr-x    2 root     root           48 Feb  6  1996 info/
  drwxr-xr-x    5 root     root          376 Sep 27 23:59 lib/
  drwxr-xr-x   12 root     root          288 Sep  6 18:16 man/
  drwxr-xr-x    3 root     root           72 Sep 22 02:21 netscape/
  drwxr-xr-x    2 root     root           48 Feb  6  1996 sbin/
  drwxr-xr-x    3 root     root           72 Sep  7 07:47 share/
  drwxrwsr-x    7 root     ddm           256 Feb  9 04:42 src/

You now want to make some, or all of these into their own filesystems,
in order to make them all fit on a CD.

So, why not just create ISO images of those directories that you
intend to make into their own filesystem?

To illustrate what I mean, if you had the disk space to store the
ISOs, you could do this:

  cd $root_dir_of_filesystem
  for dir in `ls`; do

    cd $dir
    mkisofs -o $fs_with_enough_space_to_hold_the_images/$dir.iso .

  done

If you actually can get away with making one ISO per directory, then
since this IS your back-up, there isn't really any need to break the
filesystem down to make smaller ones.  Obviously, you'll probably want
to use various options for mkisofs, such as those that let you use
long filenames, etc... but you get the idea.  For example, the command
line I usually use for mkisofs is this:

  mkisofs -v -r -l -J -T -o ../CD_Images/disc.iso .

I'll leave it as an exercise for the reader to figure out what all the
options do (since I don't remember what they do anyway).  :)

If you only want to make seperate filesystems out of a few of the
directories though, say bin, sbin, and share, and then leave the rest
of them all in one filesystem, it's a little bit more complicated.
But not too much so.

First, make your ISOs of the filesystems you want to split.  As with
any backup, once you've done this, you should check to make sure the
data is intact.  In this case, it's extremely important that you do
this, because you're about to delete the data you just backed up!

Once the ISOs are done cooking onto a CD, and you've taken the time to
verify them, DELETE THE DIRECTORIES YOU BACKED UP.  This will leave
you with only the data that you want in your one final filesystem
remaining on the disk.  Now make another ISO out of this data, and
verify it too.

All that's left is for you to run (c)fdisk to repartition the
filesystem into enough partitions to make the necessary number of
filesystems, then run mkfs on them, and lay the data that you just
backed up onto them.  The easiest way to do that is to mount the
filesystems where they should go, then mount the CD that you made
last, and use tar to copy the filesystem into its new location.  Then
mount the other CDs in succession and do the same thing.

That's it!

- -- 
Derek Martin               [EMAIL PROTECTED]    
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8awnZdjdlQoHP510RAvHtAJ9kQjcgOhxcAONupEQs+Hld9gR30ACgkMve
gtnAoTx505ujXxqXR7UY8q4=
=G5Rz
-----END PGP SIGNATURE-----

*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to