Hi, please,

I had almost lost my all backups on a corrupted microSD so not any backup would have been useful a few days ago :slight_smile: Fortunately I had a backup on my notebook.

So would be super useful to have a possibility to:

  1. set auto backup

  2. set a location of the backups
    (*not so important

  3. an option to exclude thumbnails (or make 2 backups optionally)

  4. an option to create also a Kodi backup (independent from the operating system for an easier migration across platforms, so maximally 3 kinds of backup, 3 files)

  5. a button “create the backups right now” of course too :slight_smile:

  6. and have NO worry about anything wrong that could happen any time :slight_smile:

What do you think?

edit: not talking about Kodi but about the whole CoreElec as is done by the CE settings of course :slight_smile:
added just Kodi backup possibility


That would be a great and very useful feature :slight_smile:

1 Like

It looks like there could be an existing kodi addon to do this:-

I haven’t tried it myself but it looks as though it does what you are looking for. You can specify the backup location, select which file types to backup and run the backup on a schedule.

I dont know how to skip the thumbnails, but i have a backup solution. I run the following command and a backup is created:

tar cpf /your/path/here/$(date +%Y%m%d%H%M%S).tar /storage

You could have this command run everyday automatically at 4:00 am by adding this line to cron:

0 4 * * * tar cpf /your/path/here/$(date +%Y%m%d%H%M%S).tar /storage

Though, this will accumulate backups over time. Maybe someone with better linux knowledge can tell you of a command that will delete old backups.

1 Like

Is this “Backup” add-on working exactly as the CoreElec backup ?
It’s been years since the last time I’ve used it, but I do remember abandoning it because restoring from a backup never worked reliably for me.
CoreElec backup, on the other hand seems to work perfectly.

1 Like

but maybe the possible settings could take into account even a creation also a Kodi settings to make a migration to a completely different system easier, so two files could be created acc to the user :slight_smile:

I might give it a go later and report my findings.

From memory , I think you have to force close Kodi when the restore backup is at the end.
I Haven’t used it with CE but that is what i do on Android.

Thanks for the feedback.
I think it’s time to try again that Backup add-on.
I will also keep a CoreElec backup to be on the safe side, before I try with the add-on.

I have seen a big demand about this so here is the full Cron+script automatied solution in my case with (arbitrarily):

  • excluded thumbnails (you can disable it of course in the script)
  • every 3rd day at 3:00 AM
  • saved on USB flash
  • keeps 50 backups in total

It’s done in 2 seconds because of the excluded thumbnails in this case (around 80MB).

  1. create script for backup and save the file to /storage/.kodi/userdata/
#Purpose = Backup Kodi
#save this file to /storage/.kodi/userdata/
#define your backup-directory

DESTDIR="/var/media/8 GB/kodi_backup/"

#number of backups, which exists after the script will have been finished = NUM+1
#50 backups to be saved
ls -1tr "$DESTDIR"/*.tar | head -n -$NUM | while read -r i
  rm "$i"

TIME=`date +%Y%m%d%H%M%S` 	# date in backup name.
FILENAME=$TIME.tar 			# Backup Name

SRCDIR="/storage/.kodi/ /storage/.cache /storage/.config/"

  1. enable cron in the CoreElec settings
  2. set task for the every 3rd day at 3:00 AM
    3a) crontab -e
    3b) 00 03 */3 * * /storage/.kodi/userdata/
    3c) press ctrl+x
    3d) y
    3e) enter
  3. not sure about a restart, probably not necessary
  4. recommend to delete to recreate thumbnails after backup restore this database: /storage/.kodi/userdata/Database/Textures13.db


Thx to @pepeq and @gregeeh for the script we have started with.
Would be very nice to have this in wiki or even in the backup section GUI.

Hey, I’ve got this script working fine, but for some reason the cron job isn’t running. I’ve set it to run every day at 8pm and the output of crontab -l shows as:

0 0 20 ? * * * /storage/.kodi/userdata/

It doesn’t seem to run though, what am I doing wrong? Cron is enabled under coreelec settings.

Lot of thanks for this script
How should be made the import of the backup?

I think now it’s better to just CE commands instead of just copying like in the script.

To use a backup by this script just use a common copy/overwrite command.

But CE commands don’t skip thumbnails, do they?
How do I extract the file created by the script?

CE backup does skip thumbnails. It makes a .tar file which can be decompressed with any decent unpacking program on PC.

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