[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Scripting backups to cdrom.



On Wed, Jun 18, 2003 at 02:16:57PM +0100, Rob Keeling wrote:
> I need to add the files in alpabetical order, not splitting home dirs across
> cd roms.

Are you saying here any given home would be <700Mb in size?

> I can see how to use cdrecord and mkiso to create the cd images from a dir
> of the right size, what I can`t see is a way to
> script dividing the home dir`s between runs to make the cd`s max 700Mb.
> 
> Can anyone give suggestions?

Yup. First, you need a script that will generate ISOs from file lists. 
You probably want it to generate multiple ISOs, so it should take input like

CDROM1
/file1
/file2
CDROM2
/file3
/file4
/file5

...etc..

... and make those into cdrom1.iso, cdrom2.iso, etc. 

Then, you need a second script to run in front of the first that groups your
HOMEs into groups of <700Mb, which shouldn't be too hard (depending on 
whether homes might be <700Mb - if you _can_ guarantee that, it's very
simple to make it work).

You probably need to be aware that the general case of this - i.e., using as
few CDROMs as possible - is probably the packing problem, and therefore
NP-hard (i.e., difficult to compute). I think.

Cheers,

Alex.

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.