[K12OSN] restore backup with chroot + grub-install

Les Mikesell les at futuresource.com
Tue Dec 14 04:43:59 UTC 2004


On Mon, 2004-12-13 at 22:10, Robert Arkiletian wrote:

> I agree the file based copy is more versatile but would it not be 
> possible to just copy the partition, as above, and then copy the first 
> 446 bytes of the MBR to the backup drive MBR.

Yes, an image copy of a partition will work, but if you have to fix
up a different-sized drive to boot, you might as well just run
grub-install and then you don't really have to worry about
sizes anywhere.


> Also, any difference between tar and cp -a? I looked at man cp and it says
> 
>  -a, --archive
>               Preserve as much as possible of the  structure  and
>               attributes  of  the original files in the copy (but
>               do not preserve directory  structure).   Equivalent
>               to -dpPR.

Cp would leave the files in a normal filesystem.  Tar would normally
write everything to a single archive file unless you also extract it.
If you want to browse through the old files or diff an old one against
the current copy it is easier with normal files.  A compressed tar
archive would take less space, though.

> Apart from the fact that tar can compress. I'm guessing tar is better at 
> rebuilding the "structure" of the filesystem. Whatever that means.

No, both just open new files and write them.  You can move from one
type of filesystem to another with either tool.

> As for rsync. I don't think I will use it. I know it's faster but since 
> I have a huge backup drive I don't mind taking snapshots with tar. That 
> way if I do a backup without noticing that the drive has begun to die, I 
> can always restore a previous (known good) backup.

Rsync copies files using a temporary name and doesn't remove an existing
old file until the copy of the new one is complete.  I've only actually
seen that when running over the network, but I assume the same is true
for local copies.   Backuppc would automatically keep multiple copies
online for you compressing into even less space than tar images because
all files that don't change between runs become links that take almost
no space.

---
   Les Mikesell
    les at futuresource.com





More information about the K12OSN mailing list