Get Your Free Subscription By Email:

How To Take Hot Backup Of Raspberry Pi Without Removing The SD Card

Since we are supposed to do a lot of tweaking and tinkering with our Raspberry Pi installations, it is always a good idea to backup the working SD card image before venturing for any experimentation. One way to do this is to take the whole SD card out and use another Windows/Mac computer to backup and restore the full sd-card image as demonstrated earlier. To save you with this much hassle, here we are with another method to perform automated "hot backups" from a Raspberry Pi itself to an external USB disk drive or remote storage. Simply use the provided Shell script and enjoy fast, efficient and automated RPi backups.

Automated Raspberry Pi Backup Script

Just save the below shared Shell script (use right-click and "save as" this link) on your RPi and execute using sudo ./Raspberry_Pi_Backup_Script.sh. This script disables the "tar" compression command from the original version as it takes "too much" time on our little Pi, to get back that functionality simply uncomment the two relevant lines.

Raspberry Pi Automated Hot Backup Script

Comments

Any chance you could show how to restore a backup made with this?

When I needed a restore it was harder then I thought due to lack of another linux computer, you will need to google for how to restore dd images. This also came very handy for me - http://www.megaleecher.net/Working_With_Linux_Created_DD_Images_On_Windows for getting data back from image on a windows computer.

It seems to work fine.
Thank you so much for the script. It's exactly what I was looking for.

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.