OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: mnaim on April 27, 2022, 05:21:44 pm

Title: Feature: Backup files from file system
Post by: mnaim on April 27, 2022, 05:21:44 pm
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?
Title: Re: Feature: Backup files from file system
Post by: franco on April 27, 2022, 10:18:24 pm
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
Title: Re: Feature: Backup files from file system
Post by: mnaim on April 28, 2022, 06:24:44 pm
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.
Title: Re: Feature: Backup files from file system
Post by: EdwinKM on April 28, 2022, 06:35:51 pm
maybe better to support ZFS snapshots (filesystem snapshot). This is what TrueNAS is doing also.
Title: Re: Feature: Backup files from file system
Post by: Grossartig on April 29, 2022, 05:59:54 am
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
Title: Re: Feature: Backup files from file system
Post by: mimugmail on April 29, 2022, 07:25:20 am
You can use backuppc which rely on ssh only and doesnt need an agent or plugin :)