Backup script (was Re: muLinux base floppy image and DOS tools)

From: Miguel Angel (maacruz@navegalia.com)
Date: Wed May 03 2000 - 00:55:30 CEST


On Mon, 01 May 2000, Gerhard Thimm kindly wrote:
> Jef Knoors schrieb:
...
> > My partition is 1200 Mb, I only want to back up the first 300 Mb that is
> > used. (backup the free space would enlarge the backup file ? or not?) I did
> > run defrag on the partition.
> > See , the problem is that I work in an office where I do all the computer
> > stuff, but my boss is not able to look any further than an desktop icon.
> > That means we have to use windows95 no mather how often it will crash.
> > Reinstalling means : losing a productive day of work
> > Thats why I need the 'rescue file'
> >
> > >I also piped it to gzip to get a compressed image
> > > (less space, less time).
> > >
> > > Hint! You can increase the compresion ratio a lot cleaning the free space
> > > writing a dumb file.
> > > Suppose /dev/hda1 is mounted under /mnt
> > > If it is a FAT partition:
> > > dd if=/dev/zero of=/mnt/dumbfile
> > > rm /mnt/dumbfile
> > > umount /mnt
> > > will work fine
> >
> > Sorry, I don't understand what will happen, you create an empty file and
> > than erase it again ?
>
> No answer since yet, so will I try.
> This empty file is a very clever trick to zero all unused blocks on the
> partition. to-zero means to erase the old deleted data. WinDos does not

I could not explain myself better :-)

>
> BTW: Be really careful if you just dump a part of a partition. I never
> would do that for a rescue image. There are so many tricks in
> WinDos-Software with mirror-files, defect-marked sectors, "lost-sectors"
> for copy-protections. I think this is really dangerous. dd the whole
> partition. dd works fine in my computers but it is hard to garantee.
> And try to rescue also!

Yes! You must be very sure all used sectors are on this part. It would be
better to split this huge partition in two smaller ones using fips to reduce
the amount of unused space. If some day you need more space, you can restore
the original size of your partition using fips's restorrb.

Here there is a nice script to do all the job. It also prints the files as they
grow as a short of progress indicator :-)
To restore your partition you only have to type "gzip -cd hda1backup >/dev/hda1"

Saludos

 --
Don't see the world trought a window, be open{source}minded, and be free :-)
http://www.navegalia.com/personal/maacruz


---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk




This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:14 CET