Solved

Ubuntu copy & restore disk image over wan

Posted on 2010-11-25
12
503 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
  • 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 68
Autoresponder for Whole Domain in Plesk/Cpanel 2 76
Bizarre hard disk problem 15 119
(Open)LDAP V2.44  search proxy to AD (W2012R2) 37 132
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…
VM backups can be lost due to a number of reasons: accidental backup deletion, backup file corruption, disk failure, lost or stolen hardware, malicious attack, or due to some other undesired and unpredicted event. Thus, having more than one copy of …
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…

816 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now