Backup


March 6, 2013: 5:03 pm: Backup, General

I love the Magpi Magazine for Raspberry Pi owners. It has the feel of the old computer magazines from the 80s when I was a kid. In the last two issues there is a two part series on backing up your Raspberry Pi by Norman Dunbar. You can get the magazine for free though I encourage you to buy a subscription if you like it to support their efforts. You can start with the first part on page 12 of Issue #9 for Feb 2013. I will touch on the basics below but leave the details for Norman\’s articles.

In my case having just made the mount over to the transporter worked out great. Let\’s walk through the steps of making the image backup to the transporter folder. That will not only give you a backup but an offsite one too as the transporter syncs it off to another location.

Determine the device name of the sd card

First we need to get the device name of the sd memory card our Raspberry Pi is running on. Log into the Pi and run the following command.

sudo fdisk -l

Disk /dev/mmcblk0: 8010 MB, 8010072064 bytes

4 heads, 16 sectors/track, 244448 cylinders, total 15644672 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0×00016187

Device Boot Start End Blocks Id System

/dev/mmcblk0p1 8192 122879 57344 c W95 FAT32 (LBA)

/dev/mmcblk0p2 122880 15644671 7760896 83 Linux

We can see that the partitions on the card start with \”mmcblk0\” and that is the part we need.

Run the backup to our mounted transporter drive

The backup will take a while to write especiallly if you have an 8GB or more card. You will not get a progress indicator. You will know it is done when you see records output lines.

sudo dd if=/dev/mmcblk0 of=/home/pi/transporter/raspi/Rpi-Backup.img bs=2M

3819+1 records in

3819+1 records out

8010072064 bytes (8.0 GB) copied, 1054.02 s, 7.6 MB/s

Confirm the backup is over on the transporter

ls -lh /home/pi/transporter/raspi

total 7.5G

drwxrwxrwx 0 root root 0 Sep 26 00:06 Python

-rwxrwxrwx 0 root root 7.5G Mar 5 23:18 Rpi-Backup.img

That is all there is to it. You have an image backup of your active sd card running your Raspberry Pi.
Check out Norman\’s two part series on all the other neat tricks such as mounting the image to pull out files.

TwitterFacebookLinkedInInstapaperPocketApp.netGoogle+Share
August 6, 2008: 8:46 pm: Backup, Software

A long time back I had tested the online backup service Mozy.  By long time back I mean my version was mozy-0_6_2_6-502.dmg.  Today I was trouble shooting an application I am beta testing for someone.  I needed console logs.  Low and behold the Mozy removal script from that version was so bad it had left something behind.  I have TONS of the following events showing in my Console.

8/6/08 9:15:53 PM com.apple.launchd[1] (com.mozy.backup[1457]) posix_spawnp(“/Applications/Mozy.app/Contents/Resources/MozyBackup”, …): No such file or directory 

8/6/08 9:15:53 PM com.apple.launchd[1] (com.mozy.backup[1457]) Exited with exit code: 1 

Well a bit of googling and I find that this combination works to finally get rid of that sucker.

sudo launchctl unload /Library/LaunchDaemons/com.mozy.backup.plist

Follow that up with going into the /Library/LaunchDaemons and tossing the file com.mozy.backup.plist into the trash.  Now I have nice clean console logs for troubleshooting a real problem.  Not something sucking up CPU cycles trying to relaunch every 10 seconds.

TwitterFacebookLinkedInInstapaperPocketApp.netGoogle+Share