New option in CoreELEC settings: Backup without thumbnails

#1

Hi there,

I think an optional option with “backup without thumbnails” would defnitely increase the number of backups beeing made - at least it would do that for me.
Doing a Backup in CoreELEC is lovely easy and worked always for me, but with the time the backups just get blown up by all the thumbnails.

5 Likes
#2

Why not make your own backup, excluding the Thumbnails, and run it via a cron job at times and a schedule that suits you. That’s what I did.

#3

Using File Manager .
Add Source / Browse / Home Folder / .kodi / Userdata / Thumbnails.
You can now open Thumbnails folder and using contextual menu / Select all / Choose Delete.
Then take a Back up.

#4

Thanks kosta, but I think you got me wrong.
I don’t want to delete my thumbnails during normal use. I take backups for worst case scenarios, e.g. updates go wrong, SD card defective…
And the majority of the backup size ist something that is not really neccessary to restore old functionality, since the TCM utility can pre-load them again.

Of course I don’t want the current backup-button to be changed. I’m asking for an extra one.

Edit: I overlooked your post gregeeh. I will have a look at it. Does restoring work as easy as in CE with your own created backup archives?

1 Like
#5

Yes, exactly the same. Here’s my script that does the same as the CE backup. Just change it to exclude the thumbnails folder.

#!/bin/bash
#Purpose = Backup Kodi

find -P "/storage/backup/"  -maxdepth 1 -type f \( -name '*.tar' \) -mtime +5 -exec rm {} \;
TIME=`date +%Y%m%d%H%M%S`            # Date in Backup Name.
FILENAME=$TIME.tar    # Backup Name
SRCDIR="/storage/.kodi/ /storage/.cache /storage/.config/"
DESDIR=/storage/backup/
tar cvf $DESDIR/$FILENAME $SRCDIR
1 Like
#6

That could be easilly done by script (especially, you can crontab it and have regular backups), for example

TIMESTAMP=`date +%Y-%m-%d`

if [ -d /storage/nas ]
then
	tar --exclude='storage/backup' --exclude='storage/.kodi/userdata/Thumbnails' --exclude='storage/.kodi/addons/packages' --exclude='storage/nas' --exclude='storage/flac' --exclude='storage/mp3' -cvpzf /storage/nas/backup/Kino/backup_obyvak_$TIMESTAMP.tar.gz /storage 
#	tar -cvpzf /storage/nas/backup/Kino/backup_obyvak_flash_$TIMESTAMP.tar.gz /flash 
else
	echo "Network disc isnt attached."
fi

.

/storage/nas/
/storage/mp3/
/storage/flac/

are cifs mounts.

2 Likes
#7

+1 very useful feature!

#8

+1 I’m for, very useful

#9

What script do i add to exclude thumbnails & packages in my script.??
I Presume a line after SRCDIR="/storage/.kodi/ /storage/.cache /storage/.config/"

#!/bin/bash
#Purpose = Backup Kodi

#define your backup-directory
DESTDIR=/storage/backup

cd $DESTDIR

#number of backups, which exists after script has finished = NUM+1
#5 backups to be saved
NUM=4

ls -1tr $DESTDIR/*.tar | head -n -$NUM | xargs rm

TIME=`date +%d%m%Y%H`            # Date in Backup Name.
FILENAME=$TIME.tar    # Backup Name

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

tar cvf $DESTDIR/$FILENAME $SRCDIR
#10

Where do I put this script, please?

#11

@kostaman: Use tar like this

tar --exclude='storage/.kodi/userdata/Thumbnails' --exclude='storage/.kodi/addons/packages' -cvf $DESTDIR/$FILENAME $SRCDIR

#12

Thank you.
I’ve jumped off this method of backups.
A lot of issues with missing parts of my build after restore.
Before and after your script added.
No more help required by me.
I’ll stick to the CE Settings configuration Addon .
Create Backup.
SMB / Copy my Backups to my Network Drive. Works for me.:wink: