Dev Log #4: Configuration Wizards — Teaching Onesimus Your Setup
Bareos configuration is powerful. It’s also a minefield of typos, forgotten directives, and “I thought that was the right keyword” moments. bconsole doesn’t validate your config until you try to load it — and by then, you might be in trouble.
Onesimus now ships with schema-driven configuration wizards that know what’s valid before you hit Save.
How It Works
We extracted the directive schemas from Bareos documentation and source code into JSON metadata files. Each resource type (Job, JobDefs, FileSet, Client, Storage, Schedule) has a schema describing:
- Valid directives and their types
- Required vs. optional fields
- Allowed values and defaults
- Dependencies between directives
The wizards use these schemas to build forms dynamically. Change the Job type from Backup to Restore, and the form adapts — showing only the directives that apply.
FileSet Wizard
The FileSet wizard was the first to ship. Creating a FileSet in bconsole means writing a config file with the right syntax. In Onesimus, it’s a guided dialog:
- Name the FileSet
- Add include/exclude paths with a file picker
- Set compression, signature, and ACL options
- Preview the generated configuration
- Deploy directly to the Director
The “deploy” step uses configure add to push the configuration to a running Director — no file editing, no restart.
Client Wizard
Adding a new Bareos client used to mean editing Director configuration files, generating passwords, and restarting services. The Client Wizard automates the ceremony: enter the client hostname, and Onesimus generates the necessary configuration for both the Director and the File Daemon.
What’s Coming
The Job/JobDefs wizard is in progress — the most complex one, since Jobs reference Clients, FileSets, Schedules, and Pools. Stay tuned.