Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-02-10 9:42:08 pm

Brenny
Senior Member
Registered: 2007-08-21
Posts: 257

How I back up my Eee over my network using Ubuntu

I used to back up my Eee using the 'dd if=/dev/sda' + gzip method to an external hard drive, but my hard drive blew up, so I returned it. Now I'm left without my backups and no drive large enough to back up the 4GB SSD. I do, however, have a PC running Ubuntu with plenty of hard drive space. The challenge was getting the backup streamed over to my PC, without storing any files locally (my SSD doesn't have room for a backup image of itself).

The solution I found: netcat. And it works beautifully, in 2 simple commands.

The first command I run on my Ubuntu host PC, the one with tons of room.

nc -l -p 2244 > /media/sdb1/eeebackup.bin.gz

nc is netcat, and this command starts up a server listening for incoming files on port 2244 (I chose 2244 because it was already open on my router). '/media/sdb1' can be replaced with any desired location, and likewise 'eeebackup.bin.gz' replaced with any filename.

Now for the command I run on the Eee to peel all 4GB off, compress it, and throw it over to my remote PC.

sudo dd if=/dev/sda | gzip | nc 192.168.x.xxx 2244

Sudo is required to gain access to /dev/sda, gzip is used to compress, and 192.168.x.xxx is the location of my computer on the local network.

Then, you just patiently wait for it to finish. Voila! Easy backup of EVERYTHING to a remote disk, just in case your tinkering brings your OS down with you!

Since netcat is just a program, this would also work with any Linux/Unix OS, not just Ubuntu. But Ubuntu has netcat installed by default, so everything would work out of the box.

Offline

 

#2 2008-02-10 10:46:51 pm

NZLamb
Member
Registered: 2007-11-17
Posts: 95

Re: How I back up my Eee over my network using Ubuntu

Excellent tutorial! smile

If you have pv installed you can view speed and progress as well, simply add it into the second command like so:

Code:

sudo dd if=/dev/sda | pv -s 4g | gzip | nc 192.168.x.xxx 2244

If you don't have pv installed you can install it with apt or Synaptic

Code:

sudo apt-get install pv

Offline

 

#3 2008-02-10 11:05:45 pm

wyopistachio
Senior Member
From: Wyoming, USA
Registered: 2007-09-22
Posts: 113

Re: How I back up my Eee over my network using Ubuntu

This sounds great!  How, exactly do you restore?  guessing...
dd if=[the ubuntu machine ip (?)] /media/sdb1/eeebackup.bin.gz | gzip | /dev/sda, somehow...
or do you have to use a local media?


Happy eeePC owner since 11-2-07

Offline

 

#4 2008-02-10 11:47:56 pm

Brenny
Senior Member
Registered: 2007-08-21
Posts: 257

Re: How I back up my Eee over my network using Ubuntu

Luckily, I haven't had to restore yet. Backups are just in case. But presumably, I'd burn it to a DVD and simply run on a LiveCD (if my OS is fried beyond repair):

dd if=/path/to/eeebackup.bin of=/dev/sda

Assuming you could get either LAN or Wifi working using a LiveCD, you could probably just reverse the process to recover.

Something like (on the Eee):

sudo nc -l -p 2244 > /dev/sda/

and then on your PC with the backup something like:

sudo dd if=/path/to/eeebackup.bin | nc 192.168.x.xxx 2244

Offline

 

#5 2008-02-11 11:39:07 pm

czar
Member
Registered: 2007-12-25
Posts: 46

Re: How I back up my Eee over my network using Ubuntu

Is there anything i can run on my windows box to allow me to access the command line remotely from the eee? I'd like to be able to backup with a simple script but i can't think of an easy way to do this.

Offline

 

#6 2008-02-12 6:46:37 pm

Brenny
Senior Member
Registered: 2007-08-21
Posts: 257

Re: How I back up my Eee over my network using Ubuntu

With Putty you can ssh into your Eee and you'll be able to run programs on it.

Offline

 

#7 2008-02-14 8:23:04 am

lyso
Member
Registered: 2008-01-22
Posts: 21

Re: How I back up my Eee over my network using Ubuntu

The problem is that this is not secure (which may or may not be a problem depending on your network). Why not just use ssh? As a side effect of using ssh there is no fiddling with netcat on the target machine. I haven't tested this, but it should work:

Code:

 sudo dd if=/dev/sda | gzip | ssh user@server "cat > eeebackup.gz"

Offline

 

#8 2008-02-15 1:03:35 pm

schwieb
Senior Member
From: North Carolina
Registered: 2008-02-15
Posts: 127

Re: How I back up my Eee over my network using Ubuntu

Instead of using 'dd' have you considered backing up key files with rsync or unison?

http://samba.anu.edu.au/rsync/
http://www.cis.upenn.edu/~bcpierce/unison/

Rsync is a one-way backup, Unison will do two-way. Either works fine over the network.


It's not the size of your computer that matters, it's how you use it!

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson