backup sanity check
On 08/15/2010 01:11 AM, Adam Carter wrote:
> why backup mbr? installing grub takes less time then the backup and
> restore of
> the mbr.
> And dd for backups? Why wasting space? Why suffering from problems
> when the new
> harddisk has a different size?
> Just tar up everything.
> Ok, so is this correct?
> Backup with tar;
> 1. boot from cd
> 2. mount /dev/sda1 /mnt/boot
> 3. cd /mnt/boot
> 4. tar czf /otherdisk/boot.tar.gz *
No, you do not want to use *, you want to use . Remember that the shell
expands "*" and you will be at the mercy of whatever happens to exist in
that directory. Using * you will miss all "dot" files. Here's the
command you want:
tar czf /otherdisk/boot.tar.gz .
> 5. mount /dev/sda3 /mnt/root
> 6. cd /mnt/root
> 7. tar czf /otherdisk/root.tar.gz *
Same as above, use "." not "*".
> 1. Boot from cd
> 2. fdisk /dev/sda
> 3. mkfs.ext /dev/sda1
> 4. mkswap /dev/sda2
> 5. mkreiserfs /dev/sda3
> 6. mount /dev/sda1 /mnt/boot
> 7. cd /mnt/boot
> 8. tar xzf /otherdisk/boot.tar.gz
> 9. mount /dev/sda3 /mnt/root
> 10. cd /mnt/root
> 11. tar xzf /otherdisk/root.tar.gz (should i exclude anything? /proc /sys?)
Yeah, probably, but most times it's just as easy to just delete them
after you've restored them. You're still booted from the CD after all....
> 12. chroot /mnt/boot
> 13. grub-install --no-floppy /dev/sda
> 14. reboot
In the perfect world, you'll be running fine from here. Let us know how
reality compares, though!