Changes between selected versions -> No backups available

Started by plgvie, January 07, 2025, 08:51:05 PM

Previous topic - Next topic
System: Configuration: History
Changes between selected versions
No backups available

That's what the GUI wants to make me believe. But it's most definitely not true as all the automatic internal backups are in /conf/backup/ (Owner:root, Group wheel, 0750 and files 0640)

It doesn't matter whether I am logged in as User with admin privileges or root.

Unfortunately I'm not sure since when but I would guess since I've moved the install to a new machine a couple of weeks ago by restoring a heavily edited backup file.

Any ideas what might have gone wrong and how to get the "compare"-feature back?

Kind rgds
Peter



How did you move the backup files over?

I recently did something similar when moving from a VM with PCIe passthrough and UFS to another VM with bridges and ZFS.
The backup files were edited to reflect the different device names...
I imported the entire /conf directory during install.

I didn't!
Just edited a manual backup to change the device names and restored it to the newly setup appliance.

Those automatically saved backups were/are generated already on the new machine - the very same whose GUI keeps telling me that there aren't any!


{"last_processed_stamp":1736337225.4422}
08-Jan-25 11:57:59 UTC

So did you remove it? And does it show backups now? ;)

QuoteSo did you remove it?
Yes
QuoteAnd does it show backups now?
Most unfortunately: No, GUI stubbornly insists in nothing being available!

FWIW, in my case, the backups were not available because my import procedure mangled the file names.
They follow a very specific pattern. As soon as I fixed the file names, the backups reappeared.

I even deleted all the (automatically generated) files in the backup directory plus the .json file; New ones were generated on a few configuration changes for testing but again nothing to compare in the GUI!

In a moment of annoyance I removed everything again and copied the whole content of the backup directory + .json from another appliance from another site to the local one: Now I can see everything that happened there but nothing new is added within the GUI!

Edit:
Renaming a newly generated files with the filename of a visible one doesn't help - it simply gets ignored.
Putting the contents of a newly generated file in an emptied old one from the other other machine works neither,  the change doesn't show up in the GUI!

I haven't looked at the logic used to populate the list but noticed each file contains a timestamp that's used in the name of the previous file.
They form a list. The .json file one level up contained the timestamp present in the filename of the most recent backup.

In other words, if you alter the entire content, you probably need to change the filename of the previous file...
There might be more subtle checks. The naming convention is the only one I tripped over during my import attempts.

I admit it was just a desperate attempt.
On the other hand as we talk about automatic internal backups, OpnSense ought to know how to name files generated on its own - and just to be clear: It generally does (it's just one out of three).
Without any further insights at where to look at and being a feature I hardly ever need, I'll leave it as it is.