I've been mulling over the idea of a simple on-device profile/role/configuration/backup management for a while. The use case is a portable/travel router that might serve different roles at different locations, e.g. a Wi-Fi router at home, a portable client + AP + VPN in a cafe, etc. Which can already be done by using the existing config backup/restore UI, but then you need to always have a device with the backups a hand. Or, alternatively, using sysupgrade
via shell, which is not as convenient on the go (despite you looking like hacker in the middle of a cafe).
I made this POC, mainly for myself, to implement the basic functionality of saving/restoring multiple local configs, including partial restores, via the System > Flash operations UI (luci-mod-system
). This uses sysupgrade
for creating and restoring full backups under the hood, and a small rpcd plugin to calculate and restore partial ones. Backups are stored under /etc/backups
.
The idea is that this leads to a more generic profile/role management UI in the future.
This post if for gathering feedback and suggestions about the UI and functionality.
Here's a video of it in action, without doing an actual restore. It might not be viewable outside of YouTube in hi-res (or perhaps it's still being processed). The UI is rough around the edges, so please don't throw all the rocks at once
TODO:
- figure out what to do about the backup files during sysupgrade
- integrate hardware switches to switch profiles
- a nicer profile switching UI on top of this functionality