public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] backup sanity check
@ 2010-08-14  4:12 Adam Carter
  2010-08-14  9:07 ` Volker Armin Hemmann
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Carter @ 2010-08-14  4:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 735 bytes --]

This is to backup my laptop from boot cdrom - how does it look?

File systems;
/dev/sda1 - /boot
/dev/sda2 - swap
/dev/sda3 - /

So to backup;
1. Get MBR (grub and partition table): dd if=/dev/sda
of=/otherdisk/sda-mbr.bin bs=512 count=1
2. Get /boot: dd if=/dev/sda1 of=/otherdisk/sda1.bin
3. Get /: dd if=/dev/sda3 | gzip | dd of=/otherdisk/sda3.bin.gz

Then too restore onto new disk;
1. Restore MBR: dd if=/otherdisk/sda-mbr.bin of=/dev/sda
    - no bs or count parameters required?
2. Restore /boot: dd if=/otherdisk/sda1.bin of=/dev/sda1
3. Restore /: dd if=/otherdisk/sda3.bin.gz | gunzip | dd of=/dev/sda3
4. Setup swap partition: mkswap /dev/sda2
5. Boot system

Caveat is the the new disk must be big enough to fit sda1/2/3.

[-- Attachment #2: Type: text/html, Size: 807 bytes --]

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

end of thread, other threads:[~2010-08-16 14:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-14  4:12 [gentoo-user] backup sanity check Adam Carter
2010-08-14  9:07 ` Volker Armin Hemmann
2010-08-15  8:11   ` Adam Carter
2010-08-16 14:47     ` Bill Longman

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