1 |
On Sun, May 4, 2008 at 7:12 PM, Mark Knecht <markknecht@×××××.com> wrote: |
2 |
|
3 |
> On Sun, May 4, 2008 at 8:25 AM, Mark Knecht <markknecht@×××××.com> wrote: |
4 |
> > Jil & Neil, |
5 |
> > Thanks for the really great information! I'm going to give this a try |
6 |
> today. |
7 |
> > |
8 |
> > It strikes me that to test my backup I could create a chroot on the |
9 |
> > very system I'm backing up. (Or some other system.) I follow the |
10 |
> > procedure we're outlining here using the install CD and when it's done |
11 |
> > I reboot the system, create a few small partitions in some extra disk |
12 |
> > space, untar the files, chroot into that environment, run some |
13 |
> > commands to test things, and then put the tar'ed files away for safe |
14 |
> > keeping feeling pretty good that everything is where I need it should |
15 |
> > the worst happen. |
16 |
> > |
17 |
> > Again, thanks for the info. I do appreciate it. |
18 |
> > |
19 |
> > Cheers, |
20 |
> > Mark |
21 |
> > |
22 |
> |
23 |
> Hi all, |
24 |
> So I'm working on this and ran into a couple of questions about tar. |
25 |
> |
26 |
> 1) I'm having trouble figuring how to best run tar. I end up with |
27 |
> files at the wrong level every time so far. |
28 |
> |
29 |
> Assume I first mount a partition that's empty, and then mount a |
30 |
> partition I want to save that contains a number of system directories |
31 |
> - /, tmp, etc. lib, mnt and others: |
32 |
> |
33 |
> mount /dev/sda8 /mnt/gentoo [[ This is empty except for a mount |
34 |
> point called TarPoint ]] |
35 |
> cd /mnt/gentoo |
36 |
> mount /dev/sda5 TarPoint [[ The partition I want to backup ]] |
37 |
> |
38 |
> Now I can see all my directories under TarPoint. What's the best way |
39 |
> to run tar, creating a file called SYSTEM.tar.bz2 in /mnt/gentoo, so |
40 |
> that later, when I have an empty partition on a different hard drive |
41 |
> (hda) where I'm going to restore the system, I can do this |
42 |
> |
43 |
> mount /dev/hda11 /mnt/gentoo |
44 |
> cd /mnt/gentoo |
45 |
> scp mark@server:SYSTEM.tar.bz2 . |
46 |
> tar xvfp SYSTEM.tar.bz2 |
47 |
> |
48 |
> and I get the system directory hierarchy back again. |
49 |
> |
50 |
> 2) This laptop is a dual boot machine so the system clock is set to |
51 |
> local when I'm in my Gentoo environment. When I drop into the install |
52 |
> CD I presume it's set to UTC as is the standard. My question has to do |
53 |
> with any requirements to setting time prior to making the tar ball or |
54 |
> untarring to build the environment. |
55 |
> |
56 |
> What I'm seeing is that the command |
57 |
> |
58 |
> tar xcjf SYSTEM.tar.bz2 |
59 |
> |
60 |
> generates lots of messages about file times being in the future. Maybe |
61 |
> this won't matter if I use the backup later than 8 hours from the time |
62 |
> I make it but in the short term will it cause any problems? |
63 |
> |
64 |
> Thanks, |
65 |
> Mark |
66 |
> -- |
67 |
> gentoo-user@l.g.o mailing list |
68 |
> |
69 |
> |
70 |
Look into what's called a "stage 4 backup": |
71 |
http://blinkeye.ch/mediawiki/index.php/GNU/Linux_System_Backup_Script_(stage4) |
72 |
|
73 |
I've had to actually use it once, and it worked fine. It already excludes |
74 |
the appropriate files: |
75 |
|
76 |
/dev |
77 |
/lost+found |
78 |
/mnt |
79 |
/proc |
80 |
/sys |
81 |
/tmp |
82 |
/usr/portage |
83 |
/usr/src |
84 |
/var/log |
85 |
/var/tmp |
86 |
/var/db |
87 |
/var/cache/edb |
88 |
|
89 |
It doesn't back up the MBR or the partition tables (primary or logical), |
90 |
though you could edit the script to do that. |
91 |
|
92 |
-- |
93 |
- Mark Shields |