public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] tar a brand new Gentoo install to a USB drive for safe keeping?
@ 2008-05-04  1:06 Mark Knecht
  2008-05-04 10:21 ` Jil Larner
  0 siblings, 1 reply; 16+ messages in thread
From: Mark Knecht @ 2008-05-04  1:06 UTC (permalink / raw
  To: gentoo-user

I've never done this before so it seems like right now would be a
great time to learn. Thanks in advance.

I've just done this installation on my laptop. For the most part it's
working fine. Still a few things to iron out but it's good enough that
I'd like to save the state of the machine so that should something
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 I can keep the whole thing under 5GB then
I can write it on a DVD and I'm in a really safe space for a fast
reinstall if something happens.

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 ~ #

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.

Restore would be to create the partitions anew, untar, install grub
from in the chroot, and reboot.

Is this a reasonable way to go? Is there something easier? (That seems
pretty easy to me...)

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.)

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

tar xjpf stage3*

to extract the main directories & files, and assuming the USB drive is
sdb1, would I just use

mount /dev/sdb1 /mnt/gentoo
mount /dev/sda5 /mnt/gentoo/backup
tar cjfp ./ROOT.tar.bz2 backup

and then repeat for the other two partitions? Or is there more to it?

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



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-05-08  8:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox