opnsense / opnsense/plugins

sysutils/git-backup: not backing up new firewall rules

Open
#5,440 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support
Dominant language
PHP
Stars
1.2k
Forks
863
Avg merge
2d 6h
Merged PRs (30d)
10

Description

Important notices

Describe the bug

I just migrated legacy firewall rules to the new rules.
Git backup didn't produce a commit.
Clicking "Setup/Test Git" produced a new commit, but didn't include new rules and didn't remove legacy rules.

The commit diff only contains

<backup><git persisted_at="<new timestamp>">

<revision>
  <description>/diag_backup.php made changes</description>
  <time><changed timestamp></time>

To Reproduce

Steps to reproduce the behavior:

  1. migrate legacy firewall rules
  2. click "Setup/Test Git" in System > Configuration > Backups
  3. check backup

Expected behavior

Configuration changes should invoke Git backup and Git backup should include the changes

Additional context

This issue could be related to #10289

Git backup worked flawlessy before. The last backup commit was 17h ago.
I updated OPNSense to 26.1.8. Before it was the latest version available yesterday.

When I diff backup files created with "Download configuration" from before and after the rules migration, lots of removal and addition of rules are shown.

Environment

OPNsense 26.1.8 (amd64).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the System > Configuration > Backups “Setup/Test Git” entry point and the /diag_backup.php change noted in the issue. Reproduce the legacy-rule migration, compare configuration backups before and after it, and verify that the Git commit includes the new rules and removes the legacy rules rather than only updating the timestamp.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, php
Domain
devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.