Armbian OS – Backing up an SD Card/USB Stick
These instructions are for those whom are running Armbian from an SD Card/USB stick and wish to make a backup image. If you are wanting to make an image of the on board eMMC storage, then please look at this document here.
Backing up if you are using SD card/USB stick for booting/running Armbian OS
If you just want to backup an SD card or USB stick that you are running Armbian from, then the best solution Ive found, actually is Clonezilla. Its free, is quite quick, will create an clonezilla image file, will compress the data/not backup the empty space on your drive and will make a 1-2-1 image of your SD card/USB stick. Additionally, you can use this to migrate between different sized SD cards/USB stick’s…. Clonezilla can re-size the partition for you accordingly!! So you could go from a 32GB SD card/USB stick to a 16MB one… or the any other direction.
The downside of Clonezilla is that you cannot run it on an ARM processor, so you will need an Intel/AMD x86 based system to boot Clonezilla from and you will need to shutdown your TV box while you do this.
You will need the following to do this
- An Intel/AMD x86 based computer that can boot Clonezilla.
- A spare USB stick or SD card that you dont mind completely wiping of all data on it (not the one you are running Armbian on!!)
- Enough storage space on your Intel/AMD x86 based computer to store whatever data it is you are about to backup off the Armbian SD card/USB stick.
- The latest stable copy of Clonezilla Live.
How to create your image file
- Format the SD card/USB stick you will be putting Clonezilla on as FAT32
- Go to the Clonezilla website www.clonezilla.org and into the downloads section. Download the stable release for amd64 in ZIP format.
- Extract the downloaded ZIP file to the root of your formatted FAT32 SD card/USB stick (we will now call this the Clonezilla drive).
- When thats completed, on the Clonezilla drive, go into the \utils\win64\ folder and right click on makeboot.bat and select “Run as Administrator”.
- Follow the prompts, confirm it is updating the correct drive letter and confirm it says it has made your Clonezilla drive bootable.
- Assuming all has worked, you can now reboot your computer and boot from your Clonezilla drive (You may need to change your BIOS boot order to allow booting from USB/SD).
- On the Yellow/White menu that appears, select “Clonezilla Live (Default Settings 800×600)“.
- Select your language, keep default Keyboard Layout and Start Clonezilla.
- Select device-image
- Select local_dev to make a Clonezilla image file to your computers internal hard drive. (We are creating an image file ON the disk, and not wiping your disk)
- At the screen that says “You can insert storage device into this machine now…….etc” you will now insert your Armbian SD cards/USB stick (Do not remove the Clonezilla drive).
- When your SD card/USB stick is detected, press Ctrl+C
- On the next blue screen you will select the drive and then the folder where you will be saving your image file to.
- When you have selected those, tab across to the Done button.
- Select Beginner and then Savedisk Save_local_disk_as_an_image
- Give your Clonezilla backup image a name that makes sense and press Ok.
- On the next screen, select the Armbian SD card/USB stick you inserted (there will probably only be the 1 option at this point to select from anyway)
- You can Skip checking the file system or check it as you wish.
- Select “Yes check the saved image” and encrypt or dont encrypt as you wish.
- Select Choose, Reboot or Power off as you please, for what your computer will do after the image is created.
- When it asks are you sure you want to create the image, say Yes.
- It will now create the Clonezilla Image which will take anything from 5 to 10 minutes depending on how much data is on your drive.
Restoring is the same process as the above, apart from you would be selecting Restoredisk Restore_an_image_to_local_disk at step 15 from above, and then browsing down your local disks folder structure to where you stored your Clonezilla image backup.
You can use any media size or type when restoring, as long as it has enough storage space to put the data on. Clonezilla should automatically re-size partitions to fill the disk.
If you wanted to use your restored SD card/USB stick on a different system, edit the uEnv.ini and extlinux..conf files to select the correct DTB file before you try booting off it.
Dont forget, restoring an image will wipe the destination media of any partitions or data currently stored on it.