Configuration backups

Started by FredsterNL, November 08, 2024, 05:41:28 AM

Previous topic - Next topic
Hi all,

I wonder if there are ways to easily create daily backup of the complete configuration and get it mailed (encrypted optionally) to a generic mail service (Not Google, they got enough data  :o )

Are there any solutions already available or any plans to add functionality in the web GUI?
Running OPNsense on a Deciso DEC750 with upgraded memory (16GB ECC) and active cooling

You can configure a daily upload to Nextcloud or a Git repo.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick,

I have already setup my gdrive for the backups but for git repos and nextcloud any reference URLs/ documentation for the same will be helpful.

Thanks

Best,
VivekSP

Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on November 08, 2024, 08:30:04 AM
You can configure a daily upload to Nextcloud or a Git repo.

Hi Patrick,

I did see those two options and actually ran NextCloud for a while, but found it to be messy and confusing.

I would like to simply get an email with attachment to my own email service (not being Google)
Running OPNsense on a Deciso DEC750 with upgraded memory (16GB ECC) and active cooling

November 10, 2024, 04:06:04 PM #5 Last Edit: November 10, 2024, 06:46:19 PM by verfluchten
We could use the API to write a simple app that will d/l the config, run it on a schedule, and call it a day.

Having said it, the API does not seem to work as stated in the manual:

https://12.34.56.78/api/core/firmware/status?key=blah&secret=blah

status_msg   "Firmware status check was aborted internally. Please try again."
status   "error"

https://12.34.56.78/api/core/backup/providers/?key=blah&secret=blah

message   "controller OPNsense\\Core\\Api\\BackupController not found"
status   400

This is confusing.

I also tried to connect to the API from a .NET app, but keep getting TLS handshake errors, so I assume that even though it works in the browser, the HttpClient in C# needs the specific API user's PFX file, but I am not able to generate it from CRT and KEY:

openssl pkcs12 -export -out user.pfx -certfile OVPN.crt -inkey user.key -in user.crt
Password required

Huh? Then ask for it! Okay:

openssl pkcs12 -export -out user.pfx -certfile OVPN.crt -inkey user.key -in user.crt -pass 123
pkcs12: Use -help for summary.

Isn't it cute when nothing works?

Hmm, it does not seem like a client cert problem. On another screen in OS I downloaded a P12 file which is supposedly the same thing as PFX and loaded it into the HttpClient. Still the same SSL handshake error. Cute.