General

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. 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.

Read More

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. https://secure.connecteddata.com/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: mkdir transporter Set the folder permissions: chmod 777 transporter We need to setup a credentials file: sudo su - While escalated to root: vi smbcreds Edit the file to be as follows, substituting in the password and username you setup as the second smb login on the raspi username=raspi password=yourpasswordhere 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: sudo vi /etc/fstab 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: sudo mount -a 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. Enjoy!

Read More

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.

Read More

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 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.

Read More

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...

Read More

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: unzip -P strong password ~/Desktop/secretzip.zip 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. Provide a GUI browser selection box to choose the protected zip file. Prompt for the password needed to unzip the file. 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.

Read More

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...

Read More

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...

Read More
TOP