vibecoded plugin

Started by Vectralis, July 06, 2026, 10:12:27 PM

Previous topic - Next topic
hello

i vibecoded a opnsense plugin because there was a feature i found missing and i really needed it fast.
can someone maybe test/check if the plugin is actually working and bug free?

Thanks in advance

github repo:
https://github.com/VulcanoSoftware/opnsense-backup-plugin

If you did not make the effort to code it why should anyone make the effort to review it?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Well idk, the reason i didn't make the effort to code it is because i don't know how to code

An almost poetic distillation of the times.  What you guys captured in just three posts is stunning.
N5105 | 8/250GB | 4xi226-V | Community

July 07, 2026, 08:38:11 AM #4 Last Edit: July 07, 2026, 08:41:03 AM by JamesFrisch
I don't code either.
So the best I can do is to review your readme, which describes your architecture.

Quoteto avoid unnecessary write cycles on the system SSD.
A backup is like what, 250k? That does not bother any SSD, not even if I do a hourly backup.

QuoteAutomatic Daily Backups: Configure a specific time for daily backups.
Why should I want that? My config stays the same, sometimes for months. Instead of doing a daily backup, I just do a backup after I change something in the webGUI. Simply by downloading the XML. Doing a backup on any interval, IMHO, does not make sense. But okay, since it is so small and programming anything else is too complicated, you could do it like the Google Drive backup; daily and keep the last 30 or whatever.

QuoteBackup Management: List, download, restore, and delete backups from the UI.
Restore? Why? There is proven and working way to restore, why should I risk using your script for that task?

TLDR: It all boils down to: What are you trying to achieve?
After you but some thoughts into that question, you can do some research (or ask in the forum) and relize that the problem you are trying to solve, is already solved. Without the risk of AI slop.

This is btw true for almost all "here is my claude code hobby project" posts that flood /r/selfhosted and /r/homelab.

Thanks for taking the time to review my code.
You are right, a 250k file doesn't bother any SSD, so that's not the most important part.
You are right about the fact that the config stays the same for a long period of time, and that it isn't very important to have daily backups. but you never know, i have been a windows user for a long time and found out that backups are very important, but in the case of windows the software itself also isn't that stable. opnsense is indeed probably rock solid and can't break if you don't touch it. but it's just a habbit. if you keep a pc running windows on 24/7 without doing somethings, it can still break itself. the built-in solution you propose to backup my opnsense configuration is a working approach but it's manual work. i like automation and want everything from the router to be kind of centralised on the router. if i manually download it on my client pc. it can still get lost if i save it at a random place and never look back to it.
the readme.md summarizes very good what i want to achieve, but the most important thing i wanted to make sure is that the code was actually working. i litterally installed opnsense yesterday so i don't know a lot about it, so i am not very familiar with testing it on a platform which i have never used.

But there is a periodic backup mechanism with various destination options in OPNsense, already. Standard, out of the box.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Vectralis on July 07, 2026, 12:14:28 PMIf I manually download it on my client pc it can still get lost if i save it at a random place and never look back to it.
Ehm...

Is it that hard to have something like :
- C:\Users\$user\My Documents\OPNsense\ - Windows
- /home/$user/Documents/OPNsense/ - Linux/*BSD

And keep everything in there ?!

Just organise your stuff and you should be fine ;)
Weird guy who likes everything Linux and *BSD on PC/Laptop/Tablet/Mobile and funny little ARM based boards :)

Quote from: Patrick M. Hausen on July 07, 2026, 12:22:26 PMBut there is a periodic backup mechanism with various destination options in OPNsense, already. Standard, out of the box.

Really? that would be the thing i was searching for. can you maybe tell me where i can find it on the opnsense webpanel?
if that's already built in, then i don't need my plugin and then the plugin is completely useless.
i was probably just too blind to see it because i was in a hurry lol

July 07, 2026, 08:54:59 PM #9 Last Edit: July 07, 2026, 08:56:36 PM by Patrick M. Hausen
System > Configuration > Backups:



In System > Firmware > Plugins you will find additional backup destinations:

- git
- Google drive
- Nextcloud
- SFTP

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