Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] backup sanity check
Date: Sat, 14 Aug 2010 05:06:42
Message-Id: AANLkTinrA27KZwfX=uHR7owxds28fhcK76=n=LuZeOUt@mail.gmail.com
1 This is to backup my laptop from boot cdrom - how does it look?
2
3 File systems;
4 /dev/sda1 - /boot
5 /dev/sda2 - swap
6 /dev/sda3 - /
7
8 So to backup;
9 1. Get MBR (grub and partition table): dd if=/dev/sda
10 of=/otherdisk/sda-mbr.bin bs=512 count=1
11 2. Get /boot: dd if=/dev/sda1 of=/otherdisk/sda1.bin
12 3. Get /: dd if=/dev/sda3 | gzip | dd of=/otherdisk/sda3.bin.gz
13
14 Then too restore onto new disk;
15 1. Restore MBR: dd if=/otherdisk/sda-mbr.bin of=/dev/sda
16 - no bs or count parameters required?
17 2. Restore /boot: dd if=/otherdisk/sda1.bin of=/dev/sda1
18 3. Restore /: dd if=/otherdisk/sda3.bin.gz | gunzip | dd of=/dev/sda3
19 4. Setup swap partition: mkswap /dev/sda2
20 5. Boot system
21
22 Caveat is the the new disk must be big enough to fit sda1/2/3.

Replies

Subject Author
Re: [gentoo-user] backup sanity check Volker Armin Hemmann <volkerarmin@××××××××××.com>