robweber / xbmcbackup

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

Adding Backup Tasks #153

Open robweber opened 4 years ago

robweber commented 4 years ago

Original idea per MB1968 on the Kodi Forum.

Most comprehensive backup utilities have an idea of "backup tasks". These are selections of files that can be backed up as a unit. A general example would be a Full backup set of everything in a program and then a weekly/monthly set that are subsets of the full. Different variations of this can occur but the basic idea is that not every backup is a full backup.

Adding Backup Tasks Adding this type of functionality to Backup addon could work in one of two ways, both are predicated on the idea that users would utilize the Advanced type of file selection. These would most likely not apply to Simple setups.

The first would be to extend the Backup selection dialog to include a selection dialog from the Backup Sets currently in the Advanced Editor. Currently the backup function always does a backup of every set, every time. This additional selection would allow for specific sets to be created (such as Addons, AddonData, etc) and either all or some of them backed up. This would mirror the recovery dialogs that allow for specific restoration. (referred to as Set Selection option below)

The second way would be a more comprehensive addition to the Advanced Editor. This would allow for the creation of a Task. A Task would include a collection of Sets. This essentially gives another layer to the Advanced Editor. The current implementation can be thought of as a single task only. Upon selecting the backup function you would then select the Task you want to execute and those files would be backed up. (referred to as the Task option below)

Both of the methods should include some enhancements to the scheduler and scripting functionalities. This would include multiple schedules to select sets/tasks and additions to scripting to automate backups in that fashion.

Issues

A few potential issues to solve:

UI Complexity - adding additional dialogs or layers to the editor menus adds a layer of complexity. As this is an advanced user feature there should either be sane defaults or advanced setting configs to make sure things aren't too cumbersome for the everyday user that doesn't care about these features.

Tasks vs Set selection implementation - adding the Task layer to the editor is certainly the most flexible option. A problem to tackle here is if different folders would be needed per Task? By using Set selection you could still use the same folder system in place now. Adding a Task option means that each task could have a completely different type of folder selection structure, requiring subdirectories per task. This would be a breaking change with how files are being stored. It also adds a layer of complexity to backup rotation and restore selection.