Backup and Restore Raspberry PI SD Card

If you are like me who is always trying different linux builds for Raspberry Pi or keeps messing up with Kodis configurations, this post is for your. I will teach you to make an perfect image of your SD Card so that you can simply go back to the last image, without having to install everything again from scratch.

If you don’t know how to install any linux distribution for RPi, I suggest you to follow this guide HERE

Backup

  • First thing after you insert the SD Card in your computer is to check what is the device’s location. Open a terminal, then run:
    diskutil list

    diskutil to check out raspberry pi sd card

    In my case, the SD card is in /dev/disk3. Remember that you are looking for the disk (not partition) of your SD card, so it would be disk4, not disk3s1.

  • Unmount your SD card by using the disk identifier:

    diskutil unmountDisk /dev/disk(disk# from diskutil)

    for example, in my case:

    diskutil unmountDisk /dev/disk3
  • Clone your SD Card to a file on your computer by using the following command:
    sudo dd if=/dev/disk(disk#) of=my_rpi_backup_image.img bs=4m

    you can change my_rpi_backup_image.img to any other desired name you want. Also the above process can take a few minutes to complete.

  • Now you can store your backup file anywhere you want for further restore.

Restore

  • Follow the first two steps described above and make sure you have the disk unmounted.
  • We can restore our backed up file to the SD Card, go to the folder where the image file is located and run on the terminal:
    sudo dd if=my_rpi_backup_image.img of=/dev/disk(disk#) bs=4m

    Same as before, this process can take a few minutes to complete, so you can go have some coffee while your computer finishes the job.

    Once it’s done, simply remove the SD Card from your computer, insert it to your RPi and turn it on, it will boot with the system the exact same way as it was before you saved it.

Raspberry Pi Using Whole SD Card Memory

When you install a Raspbian Operation System on your Raspberry Pi (I’m currently using Minibian) you can notice that it created a file system with very little space, which can be annoying if you are using a bigger SD card.

I only noticed it when I started to apt-get all those packages that I needed, when suddenly got the message:

cannot copy extracted data for './usr/sbin/php5-fpm' to '/usr/sbin/php5-fpm.dpkg-new': failed to write (No space left on device)

Looking into the SD card’s memory I get:

It’s full!!
Continue reading

Incremental Backups using RSYNC and SSH

I was studying last semester in Politecnico di Milano, a great university in Milan, Italy. Anyway, I am taking lots and lots of pictures here (Italy is a beautiful country).

I am saving my pictures on my computer, but WHAT IF something goes wrong with my computer?
So what I am doing is backing up my pictures (also other things as work files) to my NAS SERVER in Brazil during the night, using RSYNC via SSH (Of course it’s an incremental backup, as I have more then 300GB of photos).

On my server I don’t run SSH on the regular port 22. I use, for example the port 223.

rsync -av --update --delete -e 'ssh -p 223' /Users/dansku/MyDocs/Fotografias 
[email protected]:/home/daniel/SERVER/Backups/

Where /Users/dansku/MyDocs/Fotografias is the local dir, and /daniel/SERVER/Backups is the remote dir.

This way, even if my computer is stolen, I know my data is backed up!

DIY: Home UBUNTU NAS Server

Back in 2003, I used to connect my computer on the my old 32′ TV, those huge and heavy TVs, to watch stuff from the internet, at that time, eMule was ruling the p2p community (can’t talk about USENET right? :} ). Then in 2008 I decided to build a better HTPC (Home Theater PC), a full dedicated computer connected to my TV, with good MotherBoard/VGA/SoundBoard, well, a good computer, with gaming capacities. It was good while it lasted, but you know, it was huge black box below my TV, bit noisy, but it did the job.

Continue reading

My HTPC 2.0

Long ago, I wrote How I Made my HTPC at my place. Time passes and things change. End of year has arrived, Christmas and everything, so I decided to upgrade my system to a more efficient and cheaper one. The new choices were using a NAS (Network Attached Storage) allowing all files can be accessed from any machine connected to the network, in this case I am using Lacie Network Space 2 2TB storage. A Gigabit router TP-LINK , so far I’m very happy with this router, although. A media player WD-PLUS Live that has an embedded Linux and play videos in various formats, even FullHD , and access online content like YouTube and some radios.

Continue reading

Solving problemas with PhPMyadmin on Ubuntu

You know, everytime you want to install LAMP + phpmyadmin on Ubuntu, you can simply write on terminal:

sudo apt-get install apache2 mysql-server-5.0 php5 php5-mysql phpmyadmin 

Ok, you are ready to go, but the only problem is that you can’t find the phpmyadmin folder when accessing http://localhost/ you can’t even see the folder at /var/www/ . So what you should do is:

sudo ln -sf /usr/share/phpmyadmin/ /var/www/phpmyadmin

It will link the phpmyadmin folder from /usr/share/phpmyadmin/ to /var/www/phpmyadmin
now try going to http://localhost/phpmyadmin and you are good to go! 🙂

OpenOffice 3D

It looks PowerPoint will have a great competitor now. People will start thinking twice before paying for Microsoft’s Office. Programmer Shane M. Mathews made great slideshow effects using 3D-OpenGL’s library.

You can take a look of how it looks:

This feature will be available for everyone on the next OpenOffice.org 2.4.