Score:0

How to clone a linux server that it fails , so in case of sometning goes wrong in the process of fixing it i still have the original hard drive?

id flag

My problem is that I have a hard drive having a linux server (It fails during booting up process) and some valuable files. ( tried almost all solutions on the internet but no luck)

Now I found a company aking to send the hard drive for a fix , but as I have some valuable information on my hard drive I need to be able to clone the hard drive and send a copy to them , (in case of lost , failure etc ) .

Discovered solutions but functioning when the linux system works fine such as dd ,Partimage ,Partclone

But i wonder how to get a second copy of a linux hard drive when not booting up ? is it possible? (I beleive there must be a way to just copy sector by sector of the hard drive even if does not boot up)

Nikita Kipriyanov avatar
za flag
Was only the system on the HDD corrupted, or bad/unreadable sectors appeared too? Your actions will largely depend on that.
Score:0
in flag

So I think you can try below:

  1. Plugin your disk(source disk) to another system(Linux system because it understand current partition well as you explained it's Linux).

  2. Check if you can access content.

  3. Mount one more empty disk(target disk) with same size(based on size of actual data)

  4. Run dd command like below

    dd if=/dev/"Source device" of=/dev/"Destination Device" bs="base size"

Cloning doesn't look if cloning source(source disk) is functional or not(Most of the time else it will ask you to skip) you can execute clone from another machine just attach source disk to working OS to identify target cloning source. But remember it clone exactly as source including bad/corrupted copies of file/sectors etc.

Nikita Kipriyanov avatar
za flag
This way `dd` will stop on first bad sector. To make it skip (and fill with zeros on output), add `conv=noerror,notrunc,sync`. But if you are going to rescue image of a bad hard disk, better to use `ddrescue` tool, which implement smart strategy in case of bad sectors.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.