Presets backup
Closed this issue · 1 comments
Plugins should be able to hook into a backup process and extend configuration.
To achieve that the architecture has to be refactored. The whole process should be handled over events.
PRE_BACKUP_EVENT
:- Create destination and source
- Create and fill system-database (with basic values)
- (optional - with plugins) The configuration can be extended
BACKUP_EVENT
: Thrown foreach backup-part- Create part-database and write
started
to database - Find plugin
- Resolve options
- Call backup from plugin (inclusive exception handling)
- Write
finished
, close and write database
- Create part-database and write
PRE_BACKUP_EVENT
:- Write informations to database
- Close and write system-database
- Close destination & source
Same for restore.
The preset can hook into the PRE_BACKUP_EVENT
. The check command should also be able to extend it. Maybe also call an CHECK_EVENT
or a better name which can also be used.
Preset should have a PresetPool
hook into the events and hold PresetInterface
objects.
This Architecture should enable also other features in the future and make extensions more powerfull.
The complete event-architecture is not as good as it looks i will create a smaller step where the events will be thrown but a lot of the logic will be implemented in nanbando core class