TIP: How to do disk image backups in Ubuntu Linux 10.04

Posted on November 28, 2011 by David Hilowitz

So, I just installed Ubuntu Linux 10.04 on my trusty Toshiba Portege 3480CT8. (Yes, it works beautifully as a lightweight LAMP server.)

One of the first things I set out to do was make a disk image of my new server, so that if something goes awry, I can restore things later on.

Here’s what I did:

First, I plugged my external drive into the USB port. This got assigned to /dev/sdb.   I mounted the drive.

 sudo mkdir /media/backup_04 sudo mount /dev/sdb1 /media/backup_04 -t ntfs sudo mkdir /media/backup_04/portege-linux-backups

Next,  I installed dcfldd. This is just like dd, which comes with most Linux distributions, except that it can output time remaining (among other things).

 apt-get install dcfldd 

Finally, I started the backup:

 dcfldd if=/dev/sda of=/media/backup_04/portege-linux-backups/2011_11_28.img sizeprobe=if 

This produces an output that looks like this:

 [16% of 28615Mb] 155136 blocks (4848Mb) written. 01:17:37 remaining. 

–David

 

GO PROGRAMMING TIP: Where to put the ‘go.pbfilespec’ and ‘go.xclangspec’ files.

Posted on November 16, 2009 by David Hilowitz

So I was trying to get XCode syntax highlighting support for Google’s new Go language. I had located the two XCode files in the Go SRC package (these were in $GOROOT/misc/xcode), but for the longest time I couldn’t figure out where to put them. I finally stumbled on the answer (thanks to Talamathi for putting me on the right track): The files go in /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/

In short, if you want syntax highlighting support for the Go language in XCode, the following should get you there:
cp $GOROOT/misc/xcode/* /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/