robweber / xbmcbackup

Backup Addon for Kodi
MIT License
112 stars 48 forks source link

Incremental backups in size #173

Open stdedos opened 3 years ago

stdedos commented 3 years ago

Describe the problem I would like to have a Incremental Backup schedule, but not exactly in the spirit of https://github.com/robweber/xbmcbackup/issues/70. I would like a full backup "to exist in all cases", and then a backup minus the "User Addons", "Thumbnails / Fanart".

For a relatively new installation, the full backup is ~380MB compressed, and the smaller version is "just" ~12.8MB - I would assume that performing this on the background should be shorter too.

A very versatile solution to solve this could be: Multiple backup schedules, with unique suffixes.

I would e.g.:

Platform and Kodi version Android 8, Leia 18.9

robweber commented 3 years ago

This is a great idea. I feel it is close to #153 - which is really just a collection of my own thoughts on this idea with no code to go along with it just yet.

I like your idea of providing a named suffix to each existing backup directory. This could then be displayed in the UI during a restore. As a re-read my initial thoughts the idea of a Task->Sets->Schedule type functionality seems the most versatile. You'd define a Task, and select the directories (simple or advanced editor). You could then schedule that specific set (have to extend the scheduler for multiple schedules) or during a manual run select which task you want. The restore for this would be fairly straightforward, let the user select and restore as usual. I think the tricky part is developing a UI for this that is simple enough for users that just want to backup quickly with some presets vs those with more advanced needs.

Any additional thoughts on this are welcome!

stdedos commented 3 years ago

Well, I'll blow your mind ... wait for it ...

Web UI 😛

If you are able to somehow take advantage of Kodi's Web UI to present your own options, that'd be awesome.

However, and I guess that both that AND creating your own Web UI / API endpoint would be complicated (like YouTube's addon "API configuration page") ...

Introduce the task layout: Same "Schedule" layout, prepend with a "Activate task" boolean, and all of that times 5. If the configuration UI is dynamic, then an advancedsettings flag could be used to change that number (or just expose it as part of the settings, depending on how much dynamic is that UI).


Also ... What's up with that? https://github.com/romanvm/kodi.tvmaze/issues/20#issuecomment-738266697 You should note that, whatever I am saying is based on "that version" context.

Also also: There are too many ideas and too few constants for me to present you with a well written, making-sense suggestion. A more interactive medium, and/or a more concrete context could help

robweber commented 3 years ago

Ah yes - the current version thing is kind of a pain. The long and short of it has to do with the Leia python 2 and 3 compatibility requirement. Because of all the file IO in this addon I couldn't reliably get it working for both versions of python using the kodi-six implementation (that lib won't wrap IO functions in the xbmcvfs module). As a result I couldn't submit a version of this addon to the Leia repo so the the most current I could get was in the Jarvis repo - which is super old. They won't take "new" Krypton submissions anymore and all the newer functionality requires Kodi pieces that don't exist in Jarvis. It's a cluster based on the Kodi repo requirements. There is an updated version the Matrix repo that is Python 3 compatible and includes all the new bells and whistles.

The web UI idea is intriguing. I'll have to check the YouTube addon's repository and see how that works. An editor via the web would certainly be easier to put together and more intuitive than anything that could be done with the Kodi UI components. The Advanced Editor was really pushing the envelope there and I had to make some odd choices.

stdedos commented 3 years ago

Okay, so tl;dr I guessed right: python 2 and 3 compatibility requirement + some kodi-six (idk why they cannot use the "main" six library?) weird-ness. Ouch 😕

Well, I'll make you the same suggestion I tried to make for the Kodi Web UI (although, I got kinda lazy and I don't want to register to the forum - so I wrote it on IRC): if you'll have advancedsettings.xml, expose it via whatever means, on that WebUI - even if it's just an API endpoint. Look how convenient it is to export settings on "Enhancer for YouTubeâ„¢ | Chrome Extension": image