Automatic backup

Those that have learned that regular backups are essential, especially when using such fast evolving software as this, will have no need to be thanking God for actually using the backup function included :smile:

1 Like

@Poida I think your statement behooves that there should be an automatic backup included with this software. Libreelec people were very adamant to not include a scheduler for the backup utility because of the backup plugin of Kodi. That plugin never works for me. It somehow interferes with docker.

I hope that coreelec people will reconsider because I don’t think it will require considerable effort to include a scheduler for an inbuilt backup utility.


Why not just make your own backup script of whatever you think is important using tar and run the script via cron. That’s what I’m doing and it works very well.

I am doing it when I did not find a good alternative. But, my suggestion is for improving coreelec for other people. But, their software, their choice.

1 Like

@anon99744683, It’s great to give suggestions and express your thoughts related to adding a backup feature. The devs will probably do it if they see a high enough demand for it as adding unpopular features are just time consuming and doesn’t give the major of users added value…

So open a new thread marked “Feature request…” to measure the response and demand for such a feature :slight_smile:


please, could you provide your script to put it to autostart?
@CI6N0Z I think the demand is very obvious here :slight_smile:

edit: a feature request has been created :slight_smile:

Here’s my script. All it does is what the manual Kodi Backup does. You can change it to do more or less.

#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/"

There has never been an automatic backup included with CoreELEC, and I have never believed that there was. :wink:
My statement, which should be taken as read, contains no hidden implications and simply means that people (especially those that are new to CoreELEC) should always make backups using the backup feature that has always been included, before updating, or simply changing configuration. That way, there is no need to be so concerned if / when things go wrong, since the installation can be quickly restored. I believe there is at least one add-on that includes scheduled maintenance but have no idea if backup is an option of that routine. I, personally, prefer manual backup, then you know it is done. :smile:

no, corrupted SD can always happen, therefore auto backup is needed … and OTA works without a touch so no time to backup many times :slight_smile:

I think you misunderstood/misread my statement.

It is your software, you can do as you like but, the current backup of coreelec/libreelec is poor because it captures the screen and you cannot do anything.

It would make the software better without much effort if a scheduler and manual backup with background option was added. Again, your software, your choice. I am using rsnapshot to take weekly backups, but it took me a couple of hours or even more to set up and get everything working properly.

Libreelec people were very adamant about not including a scheduler. It appears coreelec people are similarly adamant about it, although it appears that there is a demand for this feature.

1 Like

When a typical backup can be 1G it would be unwise to have CE generating these backups in the background without your intervention. Your HDD would quickly fill up with useless backups which would simply need deleteing. If you have to intervene to delete backup - where is the benefit in just getting into the habit of backing up at regular intervals.

An auto backup is simply a bad idea unless its a much more sophisticated affair than the backup tools offered for CE. The return on effort is simply not justified.


Every automatic backup utility has an option to choose the number of backups to keep. It is not that hard to implement a limit either.

I don’t know of a single operating system or application that previously had an automatic backup feature and removed it. That tells you something about the utility of an automatic backup. Edit: this is just to show the utility of an automatic backup. I am not implying that any of the ELECs previously had an automatic backup.

But, their software their choice. I am still using this software with an automatic backup script that I wrote and I keep 10 backups. Everything is automatic. I never have to intervene. It automatically deletes the oldest one.

1 Like

CE never had an automated backup function. Therefore it is a false statement, that it has been removed in the past.
I agree with Shoog, that an automated backup is a bad idea.
If I want to watch something and it doesn’t work, because the SD card has a 100% usage due to a background backup job, I would be upset really fast.

I think it is enough to do a manual backup every month.
What exactly is really changing in a typical CE installation?
Some new addon versions and a few more media files.
When you are using an old backup file, the addons are being updated automatically after the next reboot, and your media files re-scanned.

I really don’t see the need for a scheduled backup solution.
There are much more important things to do currently (e.g. support for the Odroid N2), than working on an automated backup solution, which most people just don’t need.

When did I say that Coreelec had an automatic backup option?

strongly disagree… if there is not implemented “use max X GB for the backups or 10 files (whatever)”, then it is a choice and responsibility of the user.

  1. And of course it is a very bad idea to put backups on the SD with CE, it’s absolutely dumb if anything happens therefore Ive bought a special mini USB flash for the backups where the auto backup would save everyones day.

Let’s give the choice to a user and the demand, not some unexperienced users who even dont care about backups at all. Therefore it’s absolutely Illogical to dismis that acc to “could fill SD”. This argument wouldn’t almost happen for the experienced users who use the backup feature.

Let’s a user decides and the demand.

I thought CE was about users - the reason so many options for what I’m VERY grateful! I’d give you 50 EUR immediately as Ive done recently to another a very useful project.

Can you explain what you need a daily backup for in CE?
I can understand (and have setup) daily backups on my PC, because I work on it, change and edit multiple files, and data loss can result in real work being lost.
With CE you set it up, install all your addons, configure everything the way you like and leave it running. You can create a backup manually and keep using the system.
So even if it fails a month or two down the road, you can install fresh and restore from that backup. I used that method before when setting up new boxes, etc.
I, personally, don’t see a point in frequent periodic backups.

I understand that some users want to have this feature, but for me it would be down the priority list.
CE on S905*/S912 is mostly at a stable point right now and we’re focused on getting CE to run well on the Odroid N2. We do fix issues, but we don’t have the time for features that most people will never use.


Then I apologize and I misunderstood your comment before.

I didn‘t talk about your SD card filled up 100%, but the IO usage at 100% because of read operations due to the scheduled backup.

And my question about what really changes in a typical CE installation remains.
You both seem to have a use case, but I‘m still very sure, you don‘t REALLY need it and you are still an exception.

CE compared to other projects is still a quite small team with limited resources.
What would you like to see more? Support for a new SoC, which would be a benefit for a lot of users, and which was demanded several times in the past, or a modified backup solution, which most users wouldn‘t ever use or need?

I don’t want daily, where I wrote it? I’d set about weekly.

Anything can happen, like me despite the SD was ok… some glitch of the HW SW communication did.

Everyone doesn’t need that till something happens :slight_smile:

@relkai I’ve needed that already, don’t want to wait to need it again and pray :slight_smile:

It’s your decision, I’m grateful for everything but I bet there is a demand for it and it’s very easy for you just to set location, frequency in hours and time to schedule for the frequency, nothing more super needed :slight_smile: A script has already been provided here.

And it can be pretty pointless to backup on the CE SD card if anything happens so the SD usage is not important.

You keep saying, how urgently you need it, but you don‘t answer any questions (see the posts from TheCoolest and me).
You can restore from a quite old backup (several months) without loosing anything.

If you really want a scheduled backup, you don‘t really need an integrated solution or a whole script, but a simple tar command and a single entry in your crontab.
The tar command needed has already been covered several times:

It‘s no rocket science and I expect everyone to be able to implement it.


Yes if its so important then a very simple crontab would offer the functionality and is within the capability of anyone to implement. I did a similar thing when my library autoscrapper stopped working - I built my own simple script and crontab to do the same thing.