Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental backups in size #173

Open
stdedos opened this issue Dec 3, 2020 · 4 comments
Open

Incremental backups in size #173

stdedos opened this issue Dec 3, 2020 · 4 comments

Comments

@stdedos
Copy link

stdedos commented Dec 3, 2020

Describe the problem
I would like to have a Incremental Backup schedule, but not exactly in the spirit of #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.:

  • make a weekly full backup, with the suffix full (date-full(.zip) added by the addon), and keep two backups.
  • make a daily small backup, with the suffix small (date-small(.zip) added by the addon), and keep 5 backups.

Platform and Kodi version
Android 8, Leia 18.9

@stdedos stdedos added the bug label Dec 3, 2020
@robweber
Copy link
Owner

robweber commented Dec 3, 2020

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!

@robweber robweber added enhancement and removed bug labels Dec 3, 2020
@stdedos
Copy link
Author

stdedos commented Dec 3, 2020

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? romanvm/kodi.tvmaze#20 (comment)
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
Copy link
Owner

robweber commented Dec 3, 2020

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
Copy link
Author

stdedos commented Dec 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants