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