Feature: Backup files from file system

Started by mnaim, April 27, 2022, 05:21:44 PM

Previous topic - Next topic
Hi,

I want to open discussion

There are some plugins/functionalities, which require some specific files on file system (Unbound custom config, Adguard config yaml ....).
Restoring firewall without these is not 100%. It would be beneficial to have in Backup section where there is option to backup RRD etc to have option to select file or folders to be included in backup.xml.
When there is backup requested by button or plugin these files serialized to base64 included in backup.xml will produce 100% consistent backup. Same with restore.

What do you think?

If somebody wants to take a stab at developing a plugin that does that please do. Note that due to technical requirements some include directories are not exclusively custom config since e.g. Unbound requires a shared staging dir for persistent reboots (at least for the time being).

That being said this basically defeats the purpose of what these custom files are meant for: building plugins that enhance the services not by custom file blob but modelled service settings for specific use cases that plug into the existing (core) service structure.


Cheers,
Franco

I understand what you meant, that plugin should provide settings for services. But Adguard as example - you have to replicate all configuration logic in Adguard GUI to generate yaml file.

Maybe better way could be some event in case backup started to plugins subscribed to that event to gather config values to be included in backup file.

maybe better to support ZFS snapshots (filesystem snapshot). This is what TrueNAS is doing also.

Specifically with regard to backing up AdGuard Home configurations, perhaps one of the following two projects offers an interesting angle of synchronizing the configuration between two AdGuard Home instances. So you could run a secondary instance on, say, a Raspberry Pi and have it become the backup for your configuration (or vice versa). I am myself running two instances of AdGuard Home, one in OPNsense and another on a Pi, but I'm not yet synchronizing them.

https://github.com/bakito/adguardhome-sync
https://github.com/atoy3731/adguard-sync

You can use backuppc which rely on ssh only and doesnt need an agent or plugin :)