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.