Solved

Ubuntu copy & restore disk image over wan

Posted on 2010-11-25
12
518 Views
Last Modified: 2012-06-27
How do I zip & copy running ubuntu hard disk image directly to the remote system over wan links without copying it on a local disk. And again I want to restore the zipped image directly from the remote system when required booting from live cd.
0
Comment
Question by:Thyagaraj03
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 9

Expert Comment

by:fcontrepois
ID: 34215890
I think rsync is able to do this. But you surely need to activate the boot loader from the  cd

Nb: take care of the dynamic folders like /dev or /proc for exampke
0
 

Author Comment

by:Thyagaraj03
ID: 34215907
How could I do this with rsync and how to activate the boot loader from cd?. Please post commands!.
0
 
LVL 9

Expert Comment

by:fcontrepois
ID: 34215928
That's an hard task.

Another way could be to use the pxe boot

Check https://wiki.koeln.ccc.de/index.php/Ubuntu_PXE_Install
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 17

Accepted Solution

by:
owensleftfoot earned 167 total points
ID: 34216109
0
 

Author Comment

by:Thyagaraj03
ID: 34216397
Thanks. Can't I do this with dd
0
 
LVL 35

Assisted Solution

by:torimar
torimar earned 333 total points
ID: 34216830
You can - theoretically - use 'dd' over netcat.
But, as fcontrepois pointed out already, it's not an easy task. You need to be ready to dig through long instructions and run some testing.

Here are three articles that describe the method in less and more detail; one even offers scripts for automation:
http://digiassn.blogspot.com/2006/01/dd-over-netcat-for-cheap-ghost.html
http://linuxtipsandtricks.com/shell/disk-imaging-with-netcat-and-dd-with-ubuntu-linux/
http://www.rajeevnet.com/hacks_hints/os_clone/os_cloning.html

(Note that the last and most comprehensive article was written in 2001)

@owensleftfoot:
FOG only backups Windows systems.
0
 

Author Comment

by:Thyagaraj03
ID: 34217125
Instead of dd with netcat I'm using dd with ssh
The command I used to copy disk image over wan is below:
On a Running VM:
apt-get install pv
dd if=/dev/sda bs=64k conv=noerror,sync | pv | gzip -c -9 | ssh root@remote_server dd of=sdX.img.gz

On a New VM with no os I booted from ubuntu live cd I used the following commands:
sudo vim /etc/apt/sources.list file -------un commented the deb's
sudo apt-get update
sudo apt-get install pv

I used the following cmd to restore the image from the remote system, but it's not the right way to use as it's blurring up and down. I need the right syntax here:
ssh root@remote-ip dd if=sda.img.gz | gunzip -c -9 | pv | dd if=/dev/sda bs=64k conv=noerror,sync
but some how restored it

When I tried to install the grub, the device is not mounting. After I restarted, the system stalled at the grub load. How could I make it boot?. FYI, I'm trying to install on a new machine.
0
 
LVL 35

Expert Comment

by:torimar
ID: 34221091
There was no mentioning of the fact that this was about VMs.

Why didn't you simply copy over the virtual disk image (.vdi) or export/import the machine from the VBox interface?
0
 
LVL 9

Expert Comment

by:fcontrepois
ID: 34221242
With a VM it's easy :)
0
 

Author Comment

by:Thyagaraj03
ID: 34224456
No. I should do this on cloud servers. But before that I should ensure that what I'm going to do works fine with no harm to the system and I'll check this on vm's
0
 
LVL 35

Assisted Solution

by:torimar
torimar earned 333 total points
ID: 34224801
Have you considered using MondoRescue: http://www.mondorescue.org/

Since it lets you restore to a completely wiped disk with other disk geometry, it will also be usable, I gues, for restoring to a different box, as long as system specs are comparable: http://www.mondorescue.org/docs/mondorescue-howto.html#AEN951
0
 

Author Comment

by:Thyagaraj03
ID: 34333336
I'll try this.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question