Best practice for backup of working CoreElec installation on SD cards


In general my coreElec installations have been stable, but from time to time I run into a corrupted video database, or want to upgrade to a better SD card. My media NAS servers have 1700 movie rips and 4100 television series episodes, so the kodi video library is getting pretty big, and is a pain to have to rescan whenever the video database gets corrupted or a fresh installation is used.


  • stable S905x3 running CoreELEC-Amlogic-ng.arm- nightly on a scanDisk class 4 4GB SD card. Installation is setup to boot from SD card with the kodi data on the internal emmc following these instructions: How to boot from SD/USB using internal storage for data

  • recently upgraded 9.2.x stable to 9.5 stable on a Minix _neo_u9h box using a 2GB generic SD card (slow so probably class 4 or lower). Boots from SD card & stores kodi data on SD card.

I’ve been having problems deciding on the best way to backup these working coreElec installations, I thought that making a dd image of the SD cards from a mac that can read SD cards would be a pretty easy way of doing this, and would grab any customizations made for booting prefs; but this process doesn’t seem to be stable.

I made a dd image of a 4GB SD card with the working CoreELEC-Amlogic-ng.arm- nightly installation used to support a bqeel S905x3 quad-core 64bit dual wifi, GigEthernet, 4GB RAM, 64 GB ROM (emmc) box, and a dd image of the 2GB SD card with a working CoreElec-9.5 install supporting a Minix _neo_u9h box.

Both dd images of the SD cards were copied over to 32GB class 10 cards, and both of the 32GB SD cards booted into coreElec when installed in their respective android boxes. However initial testing of the 32GB SD cards indicates the installations don’t seem to be stable. When I remove power from the devices, the SD cards are getting corrupted. The 9.5 install on the Minix box had a corrupted video database after rebooting when power was applied, and the installation on the S905x3 wasn’t able to read the kernel.

I use the following steps to write the previously saved images to the 32GB SD cards;

sudo diskutil umountDisk /dev/diskx with x being the disk# the SD card gets mounted as on the mac; in my case /dev/disk1

sudo dd if=/dev/zero of=/dev/rdisk1 bs=1024 count=1

sudo dd if=./Bqeel_CoreElec- of=/dev/rdisk1 bs=4m for the S905x3

sudo dd if=./Minix_neo_u9h_CoreElec-9.5.img of=/dev/rdisk1 bs=4m for the Minix_neo_u9h

cd /Volumes/COREELEC

cp device_trees/sm1_s905x3_4g_1gbit.dtb dtb.img for bqeel

cp device_trees/gxm_q200_2g_minix_neo_u9.dtb dtb.img for minix

sudo diskutil umountDisk /dev/disk1

After writing the previously saved dd images to the SD cards a second time, I was able to get both of the boxes to boot into coreElec and working fine, but after a shutdown and removal of power of the Minix box, the subsequent reboot when power was reapplied wouldn’t boot into the coreElec installation on the SD card. I could boot into stock android OS when the SD card was removed, and am able to boot into coreElec using the original 2GB SD card.

The install on the S905x3 seems to have survived at least one power down/power up cycle fine. Going to keep testing to see if it remains stable.

I’d like comments on if the process I am using should produce backup images that are stable, or if there is a problem with the steps I’m using. One problem with using this process when going from smaller SD cards to larger ones is that the copied image won’t utilize the extra space available in the larger SD card for the storage area. If I can get a stable way of making these backup images, then I’ll just do a fresh installation on the 32GB cards and then save backup images of them.

Also, if there is a better way of accomplishing what I’d like, maybe using the backup/restore functions in coreElec, I’m open to using them. I tried backup/restore before within coreElec before, but ran into some problems getting the restores to work, and using backup/restore requires modifying the partition names for the devices using emmc to store the kodi data. If the consensus is this is the way to to go, then I’ll spend more time working on using coreElec backup/restore.


I have my CE on the Microsd card, for that I sometimes, clone, the whole card, or partitions to a separate card.
I use Clonezilla on a bootable usb via my pc.
Now, I don’t know clonezilla very well, but I think there is an option to create an image over the network, perhaps you could give it a go.

Thanks for the reply bubblegum. I use clonezilla to backup the OS installs and hdd’s for the hardware it supports, but since it won’t boot on android devices never thought of it for the SD cards.

I’m not sure what the difference would be in this case, dd should be making a complete disk image much the same as clonezilla would, it’s just easier to run if you have a device that can read the disk you want to image, and has access to the dd command. No need to boot a device into a clonezilla instance.

I wonder if there is something wrong in the dd steps I’m using, or theres a problem when copying the image to a larger SD card. The zeroing out of the SD card & the byteSizes used were copied from steps on how to do an initial installation, maybe the values are off for what I’d like to do. Those steps do work when writing a fresh image to the storage device (usb or SD).

The two 32GB SD cards were purchased last week for this (team Group from NewEgg), Since I have no history of this brand/type of SD card being stable on these type of android installs, it’s possible the cards are the issue.

Looking for clarification if what I’m doing should work, or if there is a better practice to use, before moving to additional testing/troubleshooting.

Sorry, no idea to help with dd. I was thinking as you had data on emmc you would need to clone the whole device card & emmc.
My suggestion would be to clone the sd card to a different card, & copy any files from the emmc to another location.
As an extra precaution I use the internal CE backup, to backup folder which is on the sd card, then copy this somewhere else, at the very least you wouldn’t need to do a complete restore from scratch.

You’re running from uSD but have you tried ceemmc? Although not officially supported in some devices, it’s the best solution to “fight” uSD card corruption. You can also use the backup/restore without any problem. You just have to remind yourself that thumbnails won’t be backed up so you need to be patient after restoring your database.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.

About | FAQ | Terms of Service | Privacy Policy | Legal Notice