From: "Mark Knecht" <markknecht@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] tar a brand new Gentoo install to a USB drive for safe keeping?
Date: Sun, 4 May 2008 08:25:12 -0700 [thread overview]
Message-ID: <5bdc1c8b0805040825w2a647669x15b8762422491655@mail.gmail.com> (raw)
In-Reply-To: <481D8E3B.10606@gnoo.eu>
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
On Sun, May 4, 2008 at 3:21 AM, Jil Larner <jil@gnoo.eu> wrote:
> Hi Mark,
>
> Mark Knecht a écrit :
>
> > [...]
> >
> > happen I have a way to restore where I am today. Since the disk usage
> > is currently about 4GB it seems like a great time to do it. Is this
> > possible? I think it's essentially what the stage 3 file is that I use
> > when I install, isn't it?
> >
>
> If you don't export stage3 and /usr/portage/ files, your backup will be
> lighter. The portage tree shouldn't be backed up because it shall be
> outdated when you'll restore, and emerge --sync will bring it back (except
> if you plan to restore in two weeks and have a low speed connection so you
> use emerge-delta-webrsync, but in that case you already know why you need to
> keep the tree).
> For stage3, you can safely discard it.
>
> Cf. exclude-dires in man tar
>
>
>
> >
> >
> > > From the running system here's what things look like right now:
> > >
> >
> > laptop1 ~ # df
> > Filesystem 1K-blocks Used Available Use% Mounted on
> > /dev/sda5 15820524 3641240 11375636 25% /
> > udev 10240 172 10068 2% /dev
> > /dev/sda6 1320272 189304 1063900 16% /var
> > /dev/sda7 10278304 312012 9444184 4% /home
> > shm 1003844 0 1003844 0% /dev/shm
> > laptop1 ~ #
> >
> >
>
> Tip: use df -h and put it as an alias (alias df='df -h' in .bashrc) ;)
>
>
>
> > My thought is to boot using the install CD, mount a USB drive at
> > /mnt/gentoo, then create a mount point 'backup' on the USB drive to
> > mount each of the 3 partitions I want to back up one at a time. ( /,
> > /var and /home) Then I'll mount each partition by itself and use tar
> > to create a single file for each partition where that file gets
> > written on the USB drive. When I'm done I have 3 files.
> >
>
> Thus, you would be able to restore only one partition if needed, and there
> is less chance that all your archive becomes corrupted. I would process the
> same way.
>
> You also ought to backup the full MBR, which is a good practice, so you can
> bring back your boot sector and the partition table. Backing it up if very
> painless, just a dd command, cf. http://gentoo-wiki.com/MBR . And it saves a
> *lot* of time when restoring (especially when there is @&$#! vista
> partitions with more sectors than there is really on the disk...)
>
>
>
> >
> > Restore would be to create the partitions anew, untar, install grub
> > from in the chroot, and reboot.
> >
>
> So, restore would be a dd command for the MBR, and a mkfs on your
> partitions, then untar your backups. So you wouldn't even need to chroot
>
>
>
>
> >
> > Is this a reasonable way to go? Is there something easier? (That seems
> > pretty easy to me...)
> >
>
> It is reasonable, for one single computer. If you've more to manage, look
> at dedicated software, or more complex solution as in
> http://gentoo-wiki.com/HOWTO_Backup
>
>
>
> >
> > I don't want to create images of the partitions because I might want
> > to put the data onto a different drive or in a different
> > configuration. (Like no /var or something.)
> >
>
> With a separate backup of the MBR, you're free to restore it or not ;) But
> if you want to be able to adjust your partition tables, leave free space on
> the drive and take a look at LVM, very powerful and easy to use by now
> (there's a good tutorial on howtoforge with a debian VMWare virtual machine)
>
>
>
> >
> > If this makes sense then what commands would I want to use to do this
> > correctly. Presumably it needs to tar up links, file system
> > permissions, and everything else. Since the Quick Install guide uses
> >
>
> You *must* keep permissions of your files, so if you use tar, use -p option
> (cf. man), as if you use cp, use -p option.
>
>
>
>
> > Or is there more to it?
> >
>
> Yep, that's it. Restore mbr, mkfs, mount, untar, sync(or umount), reboot
>
>
>
>
> >
> > I'm rambling here so I'll hope for a quick answer and then give it a try.
> >
> > Thanks in advance,
> > Mark
> >
> --
> gentoo-user@lists.gentoo.org mailing list
>
>
--
gentoo-user@lists.gentoo.org mailing list
next prev parent reply other threads:[~2008-05-04 15:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 1:06 [gentoo-user] tar a brand new Gentoo install to a USB drive for safe keeping? Mark Knecht
2008-05-04 10:21 ` Jil Larner
2008-05-04 12:29 ` Neil Bothwick
2008-05-04 15:25 ` Mark Knecht [this message]
2008-05-04 23:12 ` Mark Knecht
2008-05-05 0:41 ` Mark Shields
2008-05-05 1:20 ` Mark Knecht
2008-05-05 2:54 ` Mark Knecht
2008-05-05 4:04 ` Ian Graeme Hilt
2008-05-05 8:37 ` Neil Bothwick
2008-05-05 12:17 ` Ian Graeme Hilt
2008-05-05 12:35 ` Neil Bothwick
2008-05-06 12:40 ` [gentoo-user] " Michael Schmarck
2008-05-06 21:33 ` Neil Bothwick
2008-05-08 8:00 ` [gentoo-user] " Michael Schmarck
2008-05-07 16:01 ` [gentoo-user] " Steven Lembark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5bdc1c8b0805040825w2a647669x15b8762422491655@mail.gmail.com \
--to=markknecht@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox