Raspberry Pi backup – easy and efficient

Creating Raspberry Pi backups is extremely important, have you backed up your Raspberry Pi lately? No? Well, that are you waiting for! I admit, I have messed up my Raspbian system several times and had to start fresh. It was not a problem in the beginning because I was able to learn lots of new things. As time went on, my Pi had more and more features (security camera, web server, flight radar, Raspberry Pi Weather station, etc). It would take a really long time to set everything again. That’s why it’s really important to do regular backups.

Everyone recommends that you use Win32 disk manager. Don’t get me wrong, it is a great tool for making backups. Some time ago I had bought a new SD card, and tried to restore the image, created by Win32 disk manager. It did not work, because the SD cards were not exactly the same size, although both were marked as 32GB cards. I got a message “Not enough disk space”. The second disadvantage is the image size, which is exactly the same as the SD card.

paragon backup

The solution is: Paragon Backup and recovery free. The free version does exactly what is needed. With it you can create incremental versions of the SD card. The file size is greatly reduced, in my case from 32GB to 8GB! The best thing – this backup can be restored to any SD card. Once a month I power down my Pi and replace the SD card with an old backup. That way I get very little down time. Meanwhile, Paragon takes care of creating a new backup. The files for your Raspberry Pi backup are neatly arranged in a specified folder. After the original SD card is inserted into its place, I immediately restore the created backup to my second SD card.

Granted, the process has a few extra steps compared to Win32 disk manager. But the extra clicks are worth it, the process itself is so simple and straightforward that I’m not even going to write a detailed how-to with loads of screenshots. Install it and give it a go, you will never look back!

Install nginx on Raspberry Pi

Here is how to install nginx on your Raspberry Pi. I have decided to use it instead of apache, because of its great reviews and speed. First off, you need to update the dependencies by typing in apt-get update. Wait a bit for it to finish.

Next, start installing the required packages. Type in apt-get install nginx php5-fpm php5-cgi php5-cli php5-common php5-mysql . This will install nginx along with needed php5 packages. This will take some time, so relax and wait for it to finish. Start the service up by typing service nginx start. Get your IP address by typing in ifconfig. When you have the IP, paste it into the browser. You should get a nice html page, that tells you that nginx is running. So far so good, right?

Now you have to modify the configuration a bit. Type in cd /etc/nginx/sites-available, there is a single file default, which you need to modify with nano. First off, find the line below root /usr/share/nginx/www; . You will need to add support for php files, so type in index.php next to index.html. Leave the remaining line untouched.

Search for a line that starts with pass the PHP scripts to and move down two lines to location ~ \.php$ { . You will be needing this part, so uncomment it by removing the # symbol. Do the same for next line (starts with fastcgi_split_path_info) and the ones below that start with fastcgi_pass unix, fastcgi_index and include fastgi_params. Make sure you do not forget to uncomment the closing curly brace! You need to uncomment the part that denies access to .htaccess files. These lines start with location ~ /\, deny all; and the closing curly brace. For reference, take a look at the sample picture.

install nginx

Save the file by ctr+x and confirm rewriting the file. Restart the service so that the new changes start working. Issue the command service nginx restart. Lets test if .php files are now working. The contents that are displayed on the web are located in /usr/share/nginx/www. Get there and create a sample file with nano test.php.
Type in <?php phpinfo(); ?> and save by ctr+x. Open your browser, put in your ip and new file for example Recheck if a html page appears with only the IP. That is all for now, you have successfully installed nginx!

How to solder Adafruit Pi Cobbler Kit

I have recently received my Adafruit Pi Cobbler kit, which I will be using for an upcoming project of mine. The pieces themselves might look intimidating to some people, but the whole process is pretty simple and beginner friendly. That is why I decided to write a “How to solder Adafruit Pi Cobbler Kit”.Unpack all of the items from the bags, start by removing the one black long “stick” – these are the header pins. Break it in two 13 pin pieces. There were a few extra pins left in my case, but do not worry about them. Place them somewhere on the protoboard, anywhere will do.

2013-07-01 18.08.43


Next off, prepare the PCB and the ribbon case socket. There is only one way of putting it together correctly. Make sure that the indentation is next to the number 21. In my case it was next to 21/27. Yup, just like in the red circle in the image below. Meanwhile, turn your solder iron on, so it gets nice an hot.

2013-07-01 18.09.20

Now the fun part. Turn the whole piece around, so you see the pins that need to be soldered. Go on, start soldering. I recommend using a less thick solder iron that I was using, because it’s much easier to solder.

2013-07-01 18.09.42

After that, take the protoboard from the first step. Place the newly soldered item on the pins. It does not matter which way you put them on. In the final step, solder these pins together and you are nearly done.

2013-07-01 18.29.06

For the final step, connect the Pi Cobbler with the ribbon cable and you are done! It was not that hard, right?