Make my backup history safer.

Started by Roger@Opnsense, Today at 09:57:53 PM

Previous topic - Next topic
Hi,

I recently did a System → Configuration → Backups → Restore configuration and quickly discovered that I lost everything under /conf/backup.

I guess I should have been a bit more cautious. After looking into it, I see that I had "Flush (full) local configuration history" selected, which I assume explains what happened.

From what I have found, I assume the deleted files are not recoverable through OPNsense itself, particularly since I am using UFS rather than ZFS. I do still have the configuration backups that I downloaded through the interface and stored externally, so I could probably reconstruct at least some of the Git history from those, or simply accept the loss.

Is there any practical way to recover either the old Git repository or the deleted XML configuration files on UFS?

I was also wondering whether the restore behavior could be made a little less aggressive. For example, could "Flush (full) local configuration history" be unchecked by default?

Finally, would moving the Git repository outside /conf/backup and replacing it with a symlink make it safer from this particular operation? For example:

mkdir -p /backup/git
ln -s /backup/git /conf/backup/git

Would the flush operation follow the symlink and delete the target contents, or would it only remove the symlink itself?

Thanks!

Are you using the os-git-backup plugin? Because if you don't I don't quite get what you are talking about. There is no git repo in /conf/backup.

And you cannot undelete a file on UFS, sorry. Neither can you do that on ZFS. ZFS only lets you roll back if you created a snapshot before the delete operation. Manually or automated, but ZFS does not do versioning or history on its own.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)