You are not logged in.

#1 2010-04-15 11:16:00

Coume
Member
From: UK
Registered: 2008-02-10
Posts: 78
Website

Create a copy/clone of my laptop HDD onto a remote server as backup

Hello,

I just bought a Qnap SS-839 so I am looking at automatically rsyncing/backuping/cloning my laptop install onto my NAS to be able to re-create my install should my HDD fails.

What would be the best way to do that in order to preserve MBR, permissions, (possible partitions) etc.. ?

Thanks in advance.
Ludo

Offline

#2 2010-04-15 12:48:59

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: Create a copy/clone of my laptop HDD onto a remote server as backup

hi, this wiki-page might be of interest for you.

personally, i use a combination of dd (for preserving mbr and partition table) and fsarchiver and can only recommend it.

Last edited by dw (2010-04-15 12:51:21)

Offline

#3 2010-04-15 16:16:41

Coume
Member
From: UK
Registered: 2008-02-10
Posts: 78
Website

Re: Create a copy/clone of my laptop HDD onto a remote server as backup

dw wrote:

personally, i use a combination of dd (for preserving mbr and partition table) and fsarchiver and can only recommend it.

Thanks.

It looks like it should do the trick for me too smile

A question, let's say I have a mbr.img, sda1.img, sda3.img and sda4.img.
My HDD dies and I neeed to use my blank/new HDD.

Am I correct that to restore I should use the following steps in this order:
1. HDD is blank, only one partition
2. restore MBR => MBR is created and the partition 1,3 and 4 are recreated...
3 (may be). Do I need to format the 3 partition before restoring the image?
4. Restore the 3 .img files

Reboot as normal and it is all sorted.

thanks in advance.
Ludo

Offline

#4 2010-04-15 16:52:11

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: Create a copy/clone of my laptop HDD onto a remote server as backup

hi, no worries. these are the steps I do (simplified, because i have an encrypted luks/lvm setup but that doesn't really matter)

save masterboot-record

dd if=/dev/sda of=backupMBR.mbr count=1 bs=512

restore masterboot-record

dd if=backupMBR.mbr of=/dev/sda

backup partition table

sfdisk -d /dev/sda > backup_partition.layout

restore partition table

sfdisk /dev/sda < backup_partition.layout

backup partition X (please have a look at the parameters)

fsarchiver -j2 -o savefs partitionX_backup.fsa /dev/sdaX

restore partition X

fsarchiver restfs partitionX_backup.fsa id=0,dest=/dev/sdaX

you don't have to format partitions before restoring.

Offline

Board footer

Powered by FluxBB