From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Jsopy-0003sH-56 for garchives@archives.gentoo.org; Mon, 05 May 2008 00:45:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3BB65E0327; Mon, 5 May 2008 00:42:02 +0000 (UTC) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by pigeon.gentoo.org (Postfix) with ESMTP id D59CEE03EF for ; Mon, 5 May 2008 00:42:01 +0000 (UTC) Received: by wf-out-1314.google.com with SMTP id 23so569277wfg.10 for ; Sun, 04 May 2008 17:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=XY+0Xk3gxyGnNLUcM0pAxWT8iPyr+4/UQ8YKEYhoDnM=; b=JfBEHTE4Me3OHQmtaVux85+uXz3CquHiW0LFWE9CsTeNLoYCOfNQGl/VunAU8rd4GusNjSCv9euzNRi7wizQqeUjEqcr/VPPl9Vk2PV5e3YXGhjvqhdS7HQggWAsjB+9g1LOReEY2cWhUqQMO0zdLbUAnh9GslM9XnOvoVVK8lM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=pgzxcJXHgMzQ/gAjCLSxAg1cV91Y2jwIiH/tNvvl85KsVFEux8HgGedF+GwjdNXMRen7RiTd/iZBIpoekS2ybpY6utSYa+6goEXPqNi4WPH/l7RZDpO9CJF+sQVHUslpUjXEohFXi9dWbmf1fSS9THQUZQkMzNl4px2GC8vMx8A= Received: by 10.142.70.13 with SMTP id s13mr2237189wfa.162.1209948118183; Sun, 04 May 2008 17:41:58 -0700 (PDT) Received: by 10.143.15.17 with HTTP; Sun, 4 May 2008 17:41:58 -0700 (PDT) Message-ID: <642958cc0805041741k7e200ba2g94568cde645e7385@mail.gmail.com> Date: Sun, 4 May 2008 20:41:58 -0400 From: "Mark Shields" To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] tar a brand new Gentoo install to a USB drive for safe keeping? In-Reply-To: <5bdc1c8b0805041612j5f958d4cred584a5cfc929efc@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_6172_29936836.1209948118179" References: <5bdc1c8b0805031806k7a14e6d3v910c0957bd514e98@mail.gmail.com> <481D8E3B.10606@gnoo.eu> <5bdc1c8b0805040825w2a647669x15b8762422491655@mail.gmail.com> <5bdc1c8b0805041612j5f958d4cred584a5cfc929efc@mail.gmail.com> X-Archives-Salt: d0bd40bf-b68a-493d-9f09-6737595dc632 X-Archives-Hash: 912b60dbb1e9c225386d6194d4f5f85d ------=_Part_6172_29936836.1209948118179 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sun, May 4, 2008 at 7:12 PM, Mark Knecht wrote: > On Sun, May 4, 2008 at 8:25 AM, Mark Knecht wrote: > > Jil & Neil, > > Thanks for the really great information! I'm going to give this a try > today. > > > > It strikes me that to test my backup I could create a chroot on the > > very system I'm backing up. (Or some other system.) I follow the > > procedure we're outlining here using the install CD and when it's done > > I reboot the system, create a few small partitions in some extra disk > > space, untar the files, chroot into that environment, run some > > commands to test things, and then put the tar'ed files away for safe > > keeping feeling pretty good that everything is where I need it should > > the worst happen. > > > > Again, thanks for the info. I do appreciate it. > > > > Cheers, > > Mark > > > > Hi all, > So I'm working on this and ran into a couple of questions about tar. > > 1) I'm having trouble figuring how to best run tar. I end up with > files at the wrong level every time so far. > > Assume I first mount a partition that's empty, and then mount a > partition I want to save that contains a number of system directories > - /, tmp, etc. lib, mnt and others: > > mount /dev/sda8 /mnt/gentoo [[ This is empty except for a mount > point called TarPoint ]] > cd /mnt/gentoo > mount /dev/sda5 TarPoint [[ The partition I want to backup ]] > > Now I can see all my directories under TarPoint. What's the best way > to run tar, creating a file called SYSTEM.tar.bz2 in /mnt/gentoo, so > that later, when I have an empty partition on a different hard drive > (hda) where I'm going to restore the system, I can do this > > mount /dev/hda11 /mnt/gentoo > cd /mnt/gentoo > scp mark@server:SYSTEM.tar.bz2 . > tar xvfp SYSTEM.tar.bz2 > > and I get the system directory hierarchy back again. > > 2) This laptop is a dual boot machine so the system clock is set to > local when I'm in my Gentoo environment. When I drop into the install > CD I presume it's set to UTC as is the standard. My question has to do > with any requirements to setting time prior to making the tar ball or > untarring to build the environment. > > What I'm seeing is that the command > > tar xcjf SYSTEM.tar.bz2 > > generates lots of messages about file times being in the future. Maybe > this won't matter if I use the backup later than 8 hours from the time > I make it but in the short term will it cause any problems? > > Thanks, > Mark > -- > gentoo-user@lists.gentoo.org mailing list > > Look into what's called a "stage 4 backup": http://blinkeye.ch/mediawiki/index.php/GNU/Linux_System_Backup_Script_(stage4) I've had to actually use it once, and it worked fine. It already excludes the appropriate files: /dev /lost+found /mnt /proc /sys /tmp /usr/portage /usr/src /var/log /var/tmp /var/db /var/cache/edb It doesn't back up the MBR or the partition tables (primary or logical), though you could edit the script to do that. -- - Mark Shields ------=_Part_6172_29936836.1209948118179 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sun, May 4, 2008 at 7:12 PM, Mark Knecht <markknecht@gmail.com> wrote:
On Sun, May 4, 2008 at 8:25 AM, Mark Knecht <markknecht@gmail.com> wrote:
> Jil & Neil,
>    Thanks for the really great information! I'm going to give this a try today.
>
>    It strikes me that to test my backup I could create a chroot on the
>  very system I'm backing up. (Or some other system.) I follow the
>  procedure we're outlining here using the install CD and when it's done
>  I reboot the system, create a few small partitions in some extra disk
>  space, untar the files, chroot into that environment, run some
>  commands to test things, and then put the tar'ed files away for safe
>  keeping feeling pretty good that everything is where I need it should
>  the worst happen.
>
>    Again, thanks for the info. I do appreciate it.
>
>  Cheers,
>  Mark
>

Hi all,
  So I'm working on this and ran into a couple of questions about tar.

1) I'm having trouble figuring how to best run tar. I end up with
files at the wrong level every time so far.

Assume I first mount a partition that's empty, and then mount a
partition I want to save that contains a number of system directories
- /, tmp, etc. lib, mnt and others:

mount /dev/sda8 /mnt/gentoo      [[ This is empty except for a mount
point called TarPoint ]]
cd /mnt/gentoo
mount /dev/sda5 TarPoint   [[ The partition I want to backup ]]

Now I can see all my directories under TarPoint. What's the best way
to run tar, creating a file called SYSTEM.tar.bz2 in /mnt/gentoo, so
that later, when I have an empty partition on a different hard drive
(hda) where I'm going to restore the system, I can do this

mount /dev/hda11 /mnt/gentoo
cd /mnt/gentoo
scp mark@server:SYSTEM.tar.bz2 .
tar xvfp SYSTEM.tar.bz2

and I get the system directory hierarchy back again.

2) This laptop is a dual boot machine so the system clock is set to
local when I'm in my Gentoo environment. When I drop into the install
CD I presume it's set to UTC as is the standard. My question has to do
with any requirements to setting time prior to making the tar ball or
untarring to build the environment.

What I'm seeing is that the command

tar xcjf SYSTEM.tar.bz2

generates lots of messages about file times being in the future. Maybe
this won't matter if I use the backup later than 8 hours from the time
I make it but in the short term will it cause any problems?

Thanks,
Mark
--
gentoo-user@lists.gentoo.org mailing list


Look into what's called a "stage 4 backup":  http://blinkeye.ch/mediawiki/index.php/GNU/Linux_System_Backup_Script_(stage4)

I've had to actually use it once, and it worked fine.  It already excludes the appropriate files:

/dev
/lost+found
/mnt
/proc
/sys
/tmp
/usr/portage
/usr/src
/var/log
/var/tmp
/var/db
/var/cache/edb
It doesn't back up the MBR or the partition tables (primary or logical), though you could edit the script to do that.

--
- Mark Shields ------=_Part_6172_29936836.1209948118179-- -- gentoo-user@lists.gentoo.org mailing list