lfsbackup hint

Kenneth Skiles kaskiles at kaskiles.org
Tue Jan 27 19:31:23 PST 2004


Hi,

Yes, I've used the tar -cf to accomplish this same thing.
But I think I found it was better to have kernel use another partition at
boot before starting the tar, maybe procs and devs or something.

Also, if you want to get a copy of one the kernel has rooted, 'parted'
'cp' worked for me.  It complained, but it did work...

Don't forget to update fstab and the grub/menu.lst kernel root before you
reboot!

Thanks, Kenneth.

On Wed, 28 Jan 2004 02:15:31 +0100, P.R. wrote:

> Hi
> 
> I mailed Nathan (nrh2 at aber.ac.uk ), the current owner of the backup
> hint a couple of days before, he doesnt answer, maybe my mail went
> straight to the spam-filter ;-)
> He overtook in September so I hope he reads this mailing list.
> 
> I have a question/suggestion:
> 
> --------------------
> Is it possible to "tar & bzip2" the whole lfs-root instead of just "cp
> -Rav" it?
> 
> The disadvantage:
> The pretty elegant restoring process: "simply follow all steps again ->
> make a backup of the backup" won't work.
> 
> Advantage: saves a lot of space and a tar.bz2-archive is sometimes better
> to handle than thousands of single files.
> 
> In my case the lfs-backup would be located on a Win98 partition.
> And there would most likely be trouble with the rwx-properties of all
> files if I just cp -Rav the lfs to that Fat32-Partition.
> A tar/bzip keeps the file permissions.
> 
> I would suggest to open an additional option of the hint deriving just
> before the cp-command:
> 
> The taring command would be something like
> 
> # cd into the lfs-dir
> cd $LFS
> 
> # tar the whole thing
> tar -cvf lfsbackup.tar *
> 
> # or if you are low on diskspace on that partition tar it elsewhere
> tar -cvf /mnt/largepartition/lfsbackup.tar *
> 
> # or if you don't want to include tools directory
> tar -cvf lfsbackup.tar --exclude=tools *
> ------------------------------------------------------------------------------------------------
> Here I need help: I haven't found a way to make tar skip only the
> sources or tools directory located in $LFS
> For example if a directory $LFS/home/peter/tools
> exists, it is also skipped.
> 
> an --exclude=/mnt/lfs/tools option doesnt work.
> 
> Maybe it isn't really important, because a backup is a backup, but I'd
> like to exclude the sources without deleting them.
> So far I renamed them to some strange unique name that tar doesn't run
> into it again in some usr/share -directory
> --------------------------------------------------------------------------------------------------------
> 
> # compress
> bip2 lfsbackup.tar
> 
> 
> The restoring rom my pretty much newbie point of view the restoring would
> go like
> 
> 1. have a host system, maybe just a boot disk (and then the big tar.bz2
> on cdrom or the fat32-partition)
> 
> 2. mount the partition where the messed up lfs is located and the
> cdrom/partition where the big archive is)
> 
> 3. erase the messed partition with 
> 
> rm -rf
> (would a "rm -rf *" erase everything on that partition - I think so? I
> don't want to fdisk/makefs again like the dos format c:   ;)
> 
> 4. bunzip und untar the big archive into that now empty partition
> 
> 5. chroot into it
> 6. run grub or lilo
> 
> Any errors I made? Better actions to take? (maybe the chroot isn't
> necessary?)




More information about the hints mailing list