robweber / xbmcbackup

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

Backup Jobs Via Scripting #175

Open robweber opened 3 years ago

robweber commented 3 years ago

This is an enhancement that depends on #153 being complete. Once the idea of a Backup Task has been defined these can be added a script parameters. Original idea from bsoriano on the Kodi Forum.

Assuming the Backup Tasks are implemented and function the following enhancements to the current scripting functions would need to be added.

Backup Task Selection

RunScript(script.xbmcbackup, mode=backup, task=task_name)

Custom JSON File

This is akin to an ad-hoc Backup Task. Instead of pre-defined one a json file, in the correct format, could be passed in at runtime.


RunScript(script.xbmcbackup, mode=backup, json=path/to/json.json)

Something to consider here is how the Task will be saved in the remote directory. It's possible as part of #153 that the JSON file format will need to be extended to include a Task name as part of the file layout.

Restore Task Selection

To help automate restores both the Task and archive file will need to be defined as part of the script with the addition of a task parameter.


RunScript(script.xbmcbackup, mode=restore, task=task_name, archive=000000000000, sets="config|database")