Backing up a Raspberry Pi to a File Transporter

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.

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.

Confirm the backup is over on the transporter

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.

RapsberryPi and File Transporter Fun

I wanted to mount some external storage on my Raspi. I had thought about a USB drive etc. Then it occurred to me I had a better solution.

I have a FileTransporter on the same network as my Raspi. Here is how I hooked it up.

Preparing the Transporter

First log into your Transporter admin site. And go to your transporters.

Choose the desired unit if you have more than one.
Choose Advanced on the right side and go into the SMF/CIFS section.


If SMB/CIFS is not enabled. Check that box to turn it on.

Then I chose to enable the “second login” option and name the user raspi.
I entered a reasonable password and that has the Transporter ready for the Raspi to connect.


Configuring the Raspi

Log into the Raspi.
Create a folder in your home directory:

Set the folder permissions:

We need to setup a credentials file:

While escalated to root:

Edit the file to be as follows, substituting in the password and username you setup as the second smb login on the raspi

Save the file and exit.
Exit again to return to the pi user account from root.

Next we need to edit fstab to mount the drive to the transporter folder:

Add the following line to your fstab. You will need to substitute the ipaddress, Name of the transporter, username and password from the transporter.
//ipaddress/nameoftransporter /home/pi/transporter cifs auto,credentials=/root/smbcreds,iocharset=utf8,file_mode=0777,dir_mode=0777

Finishing up

Now just execute the command:

You should be able to change into the transporter directory and find all the folders you have existing on your transporter. From now on if you restart your raspi it will auto mount the transporter.

If you set your rapsi to write any files to one of those folders it will now be automatically distributed to all other transporters sharing that folder. If you have other remote raspis and they have access to a transporter you now wide large distributed storage across them. Maybe one pi grabs photos and another elsewhere displays them.


Digital Nerve Center

I have been thinking for some time just how much my iPhone is the central processor of my digital life. In some ways my real world life too. I do not carry a personal laptop. In fact, despite being in information security I rarely carry around a work laptop. I tend to just leave it at home for when I need it. My iphone even serves as my car\’s central brain for user functions. Sure Apple Maps gets a bad rap but it works well for me. Bluetooth hands free for both Siri and Phone calls. I rarely even turn on my XMRadio in my car because I just stream content from my phone to my car audio system using my TuneLink bluetooth adapter.

Using just my iPhone I do 90% of what I need. I download podcasts and audiobooks on a daily basis. I check email, twitter with Tweetbot, etc all using my phone. It was a little difficult to manage at times due to power. Even with having two Mophie Air iPhone cases. I airplay content such as my audio books to an appleTV while gives plenty of volume for whole room audio via a TV. It could be inconvenient if I needed check a message, pause playback etc when the phone was on the charger. Now enter my Pebble watch. I put in a few minutes and cleaned up what types of notifications get sent to the Pebble. Now I can actually leave my iPhone plugged in on my Kensington Night Stand, with the iHandy Alarm Clock up and still stream my content and check messages all with the iPhone as the central management point.

It just amazes me to live in the future. I grew up with the Vic20 and Commodore64 and recall when modems went from acoustic couplers to plug in modular cables. Now, I even write full blog posts using my iPad with a bluetooth keyboard. Sometimes I even edit those posts via my iPhone prior to posting. Got to love it.

OSX and Public Wifi – Toggle settings with AppleScript

I like to remind folks when moving their Apple laptop to public wifi that they need to remember to turn off the iLife application sharing such as iTunes and iPhoto. Then turn on their firewall.

So here is an AppleScript that will do just that. It is written and tested on OSX Lion with iLife 11. So you may have to play with it for your version if that is not what you are running.  Keep in mind it is a toggle script.  It will reverse the settings of iPhoto, iTunes sharing and the firewall. So it is assumed you share both with the firewall off when at home.

Also you need to ensure Enable access for assistive devices is checked under Universal Access in System Preference.

Just cut and paste the below script into the AppleScript editor.  Then save either as an application on your desktop you can double click. Or save as an AppleScript where an application like LaunchBar can use it as an action. ~/Library/Application Support/LaunchBar/Actions

Continue reading “OSX and Public Wifi – Toggle settings with AppleScript”

Why do I enjoy the Apple device ecosystem?

I have been in the IT and information security industries for my entire professional career. As recent as seven years ago I had a multiple computers lab in my house. they even had removable hard drives so I could swap out operating system versions to keep my skills current. I had various pieces of network gear to go with it. At one point I had cable and dsl Internet connections so I could test VPN tunnels and emulate complex setups.
I have worked extensively with Microsoft, Cisco and many other products and technologies over the years.
So why, if I have the skills would I end up where I am now? The only two Microsoft based products in my house are my xbox360 and my wife’s eeepc netbook. Everything else is Apple. Even my network hardware.
The simple answer is I just want it to work. A few years ago I got my my first white iPod. It was the current model at the time. The video iPod with a hard drive inside. The experience with that device at the time that podcasting was starting began my path out of the desert of user experience. The iPod just did exactly what I needed it to do. That took me into my first iMac. Now I used macs a few times in college. But I never owned one.
I had a HP designed media center that I used with my xbox360 for a media extender. But that plus it’s replacement when he first one died was the last full pc I owned for myself. Even the second one died.
I had the knowledge and the skills to maintain cheaper windows gear. But my time and frustration levels became more valuable to me. I had enough of fighting my technology at work. At home I wanted things to just work.
Look at the current generation of apple products. With a firmware update I gained AirPlay/Home Sharing to and from my devices. I have audio zones in my house based on airport express units connected to speakers. I have a second generation apple tv hooked to the large tv in my man room. I can stream audio or video from my iPhone to my tv without missing a beat. I have done with this podcast streaming apps like the twit player. It is simply amazing compared to what it was like on my commodore 64 when I was a kid. Here I am watching Leo Laporte live from his studio on my iPad, I walk upstairs push a power button and AirPlay button and it’s suddenly on my tv. How is that not amazing? I am watching a guy clear across the country LIVE on a device that feels like a legal pad and I touch something and it’s on my tv like magic.
If I am listening to an audio book in my car, I can redirect the audio to the speakers in my kitchen while I clean dishes and keep listening to my book. I don’t lose my place and listen when, how and where I want to.
Honestly this is why the “competition” for Apple cannot catch up. They are too busy worrying about what Apple is doing rather than looking at how I want to use my media and devices. That should be the target: “What is the experience the consumer/users wants? And can we make a polished stable solution?” If they can answer those two questions they might show up for the game.

Need to open a password protected zip on Mac OSX?

Recently we were sent a password protected zip file at work. If you have ever tried to double click open a protected zip file you know that you will get an error not a password prompt.

If we ignore third party applications to open these files we are left with running the unzip command from terminal. You can use the option “-P password” where you replace the word password with actual password used to protect the file. An example command might look like:

This may have been good enough for me. But we have less technically inclined folks in our group who needed access to the provided files. So I made an Automator that everyone in the group could reuse for even future files. The Automator needed several features.

  1. Provide a GUI browser selection box to choose the protected zip file.
  2. Prompt for the password needed to unzip the file.
  3. Send the content to the user’s desktop regardless of whom ran it.

Here is how we build the Automator. The key components are the use of variables within Automator and a shell script object that takes the file and password as arguments that were provided by the user.

Continue reading “Need to open a password protected zip on Mac OSX?”

Adding multiple calendars from Google to iDevices

I was making a shared calendar specifically for Macworld with Victor Cajiao. It will be a busy conference so it will help if we can put all known events in one spot. Then we want to be able to modify it on the fly from anywhere and have both of us see it while we are there.

This calendar is a second one beyond my normal one in my google calendar account. My normal calendar default having added my google account in both my iPhone and iPad syncs fine. The problem is the additional calendar was not showing up. I even had my google account added as an MS Exchange server account.

Here is the trick. After you are sure your device is syncing as an ms exchange account go to on your device. Sign into your google or google apps account. Once signed in go to now you can see all the devices syncing to your account. Touch on the desired device to modify the sync settings. Now you can see the list of all your calendars in your account. By default just your main one is selected. Add your other calendars. Last step. Go into the account settings for your google account under mail on your idevice. Turn off calendar sync. Let it remove your calendar data. Ten turn it back on. Give it a minute or two to resync. Now your multiple calendars should show up.

iDevices and Creativity

I keep up on the trends in media production.  What I find really amazing is how things like the iPhone4 and iPad are making seriously professional grade work possible for anyone.  Even the true professionals.  I cannot imagine what it would have cost to make the “Nancy Lee” video for Vintage Trouble five to ten years ago just due to the equipment.  This was shot on an iPhone4 for the raw footage.  Then one of the iPhones was stolen and recovered due to Find my iPhone.   You can read that story on their blog post.


I know people in the entertainment industry and in the industries around it.  A lot of them really do not see that this sort of technology is shifting things back into the hands of the independent creators.  A number of people ask me about iPad, iPhone etc.  I ask one question first.  “Do you have kids?”  And if the answer is yes, then my immediate answer is “Yes get one.  Especially, if they are the least bit creative.”  I tell them it is a disservice to your kids not to introduce them to current technology like this.  It inspires their creativity and frankly it is how things are heading.


What about the argument iPad is just for consumption?  My answer to that is two fold.  First, how can you possibly understand how to create if you do not see how people are consuming the final results?  You have to understand the medium to best use it to create.  Second, seriously can you look at the video for “Nancy Lee” and others like it shot with an iPhone and sites like HandHeldHollywood and see limitations rather than possibilities?  Just look at The Cube from Teradek to see how iPad is influencing normal production sets.  I have said from the moment I first got my iPad that it would change movie production with dailies and scripts.


PS I loved Vintage Trouble’s sound so much I picked up the album , The Bomb Shelter Sessions, over on iTunes.  So yes making creative works like the video and putting it on YouTube can result in fan/customers.