Transferring disks with partimage

Karl F. Larsen klarsen1 at gmail.com
Tue Jul 14 21:36:51 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Siggy Brentrup wrote:
> On Tue, Jul 14, 2009 at 17:08 +0200, Joep L. Blom wrote:
>> Fred Roller wrote:
>>
>>> DD will work over the network.  Ensuring neither drive is mounted, the
>>> command would look something like this:
>>>
>>> dd if=/dev/sda1 |ssh user at destination.pc "dd of=/dev/sdb1 bs=4028
>>> conv=notrunc"
>>>
>>> sda1 = whatever source device
>>> sdb1 = whatever destination drive
>>>
>>> if you want to do the whole drive then drop the numbers (sda ->sdb)
>>>
>>> this takes awhile (5-25 Mb/s is the range I have seen).
>>> Hope this helps.  Check the archives, we just discussed this subject and
>>> proceedures for both dd and rsync are there.
>>>
>>> Hope this helps.
>>>
>> Fred & Siggy,
>> Thanks for the reply. I agree with Siggy that dd over the network is 
>> dangerous moreover I don't want the same partition size on both drives. 
>> The whole procedure is meant to store one 20 GB disk and one 80 GB disk 
>> each on a separate partition on a 1 TB disk, well at least all the ext3 
>> partitions. Of course the NTFS and FAT32 partitions will come on their 
>> own partition. I was thinking along the line of using partimage-server 
>> to move the images ( of each partition) to the destination system. 
>> However that doesn't solve my wish to concatenate the smaller partitions.
>> I'm still looking for a way to do that with a minimal of effort (!).
>> Joep
> Just curious: do you mean minimal effort for you or minimal effort
> for the OS?.  Apart from some early experiments I have always used
> a tar or cpio pipe for bulk copying, something along the lines of
> 
>   sudo  tar czf - /home | ssh sudo tar xzf - -C /
> 
> You might also consider to nfs mount the remote volume and use
> the known commands but be carefull with root rights on the
> remote volume.
> 
> In any case let the machine work for you and have a beer and
> an oude genever :)
> 
> tot ziens
>   Siggy
> 

	I found a dd backup scheme which is this:


TechDev A Digital Playground

    * Home
    * TechDev
    * Blog
    * Extensions
    * Demos

Bash Hosting Web Development MythTV Cron Email Firefox Exch XUL Linux
Windows Wireless Culture VOIP MP3 Telephony XML RSS Games Networking DRM
Google Microsoft OpenOffice PHP Yahoo Apple Java Photography Hardware
Video Wordpress Javascript Backups Adobe Python
DD Backups over SSH

To perform backups of a local workstation?s hard disk over a network,
perform the following procedures (adjusted to your particular situation
of course):

   1. Download and boot from a live Linux distro

	This is a LiveCD and that means all the partitions on the computer are
unmounted.

   2. Become ?root? within a shell
   3. Run ?fdisk -l? (?mac-fdisk -l? I know works on SystemRescueCD
0.2.0 (PPC) for PPC/Macs (what about Intel Macs?)) and note the internal
hard disk partition to backup (ex: ?/dev/hda?)

The rest assumes that (in short, you will probably have to substitute
some numbers or devices and you have ssh access somewhere):

   1. You have network access
   2. You have access to an SSH server
   3. Your network is configured with private addresses and you are not
assigning one that conflicts with another local IP address
   4. Your netmask is the same as the one supplied in the following commands

Give an IP address to the workstation you have just booted the live
Linux disc on, set the netmask, and bring the network interface up:
ifconfig eth0 192.168.1.50 netmask 255.255.255.0 up

Set the default gateway (if you need to reach outside of the LAN that
is? normally this is your router?s IP address):
route add default gw 192.168.1.1

Set a DNS server (if you are in the habit of not strictly using IP
addresses):
echo "nameserver 192.168.1.1" > /etc/resolv.conf

Execute the backup command:
dd if=/dev/hda | ssh username at backupserver.fqdn "dd
of=/directory_of_backups_on_ssh_server/backupfile.iso"

Obviously, most of the previous is getting the network up? try running
?dhclient? if the live Linux disc has it installed, and your network has
DHCP setup. ;-)
This entry was posted on Friday, September 12th, 2008 at 10:04 pm. You
can follow any responses to this entry through the RSS 2.0 feed. You can
leave a response, or trackback from your own site.

I have not tried this so I cannot say it works for sure.


73 Karl



- --

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.
        Key ID = 3951B48D

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKXPpyNuSIOjlRtI0RAjICAJ4t3Q2UR6LCGYoWWVu+lEP54FlkfACffmB0
bHU4Fw1sE9BjbnaTZDOs4vs=
=bil6
-----END PGP SIGNATURE-----




More information about the ubuntu-users mailing list