1. Home
  2. NavPi
  3. Creating a NavPi back up img

Creating a NavPi back up img

Once you’ve done all this setup, it is worth making a backup image of the SD card so if it fails, you can easily restore to this point.

In this article we will outline a few programs you can use to back up your card but, you can use any program that will produce a .img file, which you can then use with a program like Etcher to burn to a SD card.

Warning: These processes will create an .img file that is the size of your NavPi’s hard drive space, make sure you have enough room on your hard drive to store the file before you begin.

OSX – Disk Utility

Insert the NavPi’s SD card into your Mac’s SD card reader. Press the command key and space bar to open spotlight and type “Disk Utility” and press enter. You should see the NavPi SD card on the left list. Right click on it and from the menu choose “Create Image From …” and choose where you want to save the .dmg file.

After the Disk Utility has finished creating the image, convert the .dmg to an .img from terminal:

hdiutil convert /path/to/image.dmg -format UDTO -o /path/to/save/image.img

OSX – Command Line

If you have issues with the Disk Utility approach, you can use the command line.

Locate SD Card
diskutil list

/dev/disk2 (external, physical):
 0: FDisk_partition_scheme *15.8 GB disk2
 1: Windows_FAT_32 boot 43.7 MB disk2s1
 2: Linux 15.8 GB disk2s2

Identify your SD Card (look under NAME and SIZE to verify correct volume).
In this example, the SD Card is /dev/disk2. You can also see the boot and Linux partition.

Clone SD card data to destination .dmg

This example uses rdisk2in place of disk2since this will copy the data about 20 times faster. rdisk provides more direct ‘raw’ access to disk and /dev/disk takes a longer and more expensive route.

sudo dd if=/dev/rdisk2 of=/path/to/save/image.dmg bs=1m
Convert .dmg to .img
hdiutil convert /path/to/image.dmg -format UDTO -o /path/to/save/image.img

Your .img can now be backed up software like Etcher on a new SD card.


First download Win32 Disk Imager. Plug your SD card into your PC. In my computer check what the drive letter of the SD card is.

Next open Win32 Disk Imager, and click “Read Only Allocated Partitions”, after that use the drop down to select the SD card.

Next we will choose where we save the .img, click the folder icon, which will open a file browser. Navigate to your preferred save directory and then type in the file name for your img. e.g. “navpi-backup-feb-2018.img” then click “open”.

After that click “Read”, this will start the process of saving your .img, when this completes you will have your NavPi backed up.


On linux we can back up the SD card easily with a single console command. You will need to edit the following command based on where the SD card is mounted and where you want to save the .img

dd if=/path/to/sd_card of=/path/to/img bs=1M

Updated on July 27, 2018

Was this article helpful?

Related Articles