Monday, February 9, 2009

February 9th, 2009 - PowerBook G3 Massive Backup

Broadcast message from user@localhost
hi

Today I'm making a massive backup of all the Mac harddrive's content, this time the backup is made over the network using ssh dd bzip2 and a little shell script to poll dd about the read sectors

The compound command goes as follows
  • PowerBookG3 root # time dd if=/dev/hda bs=1K | bzip2 --verbose --compress --fast | ssh isamu@10.0.0.4 "time dd of=./MacintoshPowerBookG3-FullHDDBackup.dd.bz2"
And the little polling script
  • #!/bin/bash
  • while (kill -USR1 $1;) do (sleep 5) done;
The compound command is run on the target storage (in this case my Acer Aspire One) once it has a ssh connection with the source

The polling command is to be run on the source machine (the PowerBook)

Since it's a full drive backup it will take a while. Here are the partition details mac-fdisk throws.

PowerBookG3 ~ # mac-fdisk /dev/hda
/dev/hda
Command (? for help): p
/dev/hda
# type name length base ( size ) system
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Driver43 Macintosh 54 @ 64 ( 27.0k) Driver 4.3
/dev/hda3 Apple_Driver43 Macintosh 74 @ 118 ( 37.0k) Driver 4.3
/dev/hda4 Apple_Driver_ATA Macintosh 54 @ 192 ( 27.0k) Unknown
/dev/hda5 Apple_Driver_ATA Macintosh 74 @ 246 ( 37.0k) Unknown
/dev/hda6 Apple_Driver_IOKit Macintosh 512 @ 320 (256.0k) Unknown
/dev/hda7 Apple_Patches Patch Partition 512 @ 832 (256.0k) Unknown
/dev/hda8 Apple_HFS untitled 14815232 @ 1344 ( 7.1G) HFS
/dev/hda9 Apple_Free Extra 24253504 @ 14816576 ( 11.6G) Free space

Block size=512, Number of Blocks=39070080
DeviceType=0x0, DeviceId=0x0
Drivers-
1: @ 64 for 23, type=0x1
2: @ 118 for 36, type=0xffff
3: @ 192 for 21, type=0x701
4: @ 246 for 34, type=0xf8ff

Command (? for help): q


And here is the ressult of running the polling command (the only parameter it takes is the dd process id to send the USR1 signal to)
This obtains the input bytes processed by the first dd command.
  • ...
  • 1513013+0 records in
  • 1513012+0 records out
  • 1549324288 bytes (1.6GB) copied, 3305.86 s, 469kB/s.
  • ...

The speed is very slow, I compressed it before the network sending to eliminate the bottleneck caused by uncompressed dd streams traveling on the network. I expect the command to finish and I believe that's all for now (I'm pretty sleepy and it's 4:30AM, so I believe I should sleep a few hours... lol)

init 0

No comments:

Post a Comment