Project

General

Profile

Actions

Bug #16010

closed

AutoConfigBackup scheduled backups always upload even when the configuration has not changed

Added by Jim Pingle 4 months ago. Updated about 9 hours ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Auto Configuration Backup
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
Affected Architecture:

Description

There is code to detect and skip scheduled backups if the configuration has not changed since the last upload, but is is broken in several ways. As a consequence, the scheduled backup always uploads a new revision. Eventually the remote backups are all identical, which is not very useful.

I have a fix for this pending along with other ACB work.

Actions #1

Updated by Jim Pingle 4 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #2

Updated by Georgiy Tyutyunnik 20 days ago

fixed, scheduled backups not running if no config changes were made
tested on:
25.03-BETA (amd64)
built on Wed May 7 16:11:00 UTC 2025
FreeBSD 15.0-CURRENT

Actions #3

Updated by Christopher Cope 18 days ago

Tested on

25.07-DEVELOPMENT (amd64)
built on Fri May 9 21:57:00 UTC 2025
FreeBSD 15.0-CURRENT

and
25.03-BETA (amd64)
built on Wed May 7 16:11:00 UTC 2025
FreeBSD 15.0-CURRENT

It still seems to be uploading scheduled backups even without any change. Looking at the source it appears the changes are merged, but didn't fix it.

Actions #4

Updated by Jim Pingle 16 days ago

I tested on both and I can't reproduce any problem. When I switch to a schedule, say every five minutes (*/5, *, *. *. *) it makes one backup and then no more after that point.

It also logs that it skipped:

/usr/local/sbin/execacb.php: Skipping AutoConfigBackup scheduled backup (no changes since previous backup) 

If it's making a backup, something in the configuration must be changing. Have you downloaded two of them and checked a diff between them?

Actions #5

Updated by Christopher Cope 4 days ago

Tried to test this on

25.03-BETA (amd64)
built on Tue May 20 13:55:00 UTC 2025
FreeBSD 15.0-CURRENT

but am hitting another bug https://redmine.pfsense.org/issues/16204

Going back to

25.03-BETA (amd64)
built on Wed May 7 16:11:00 UTC 2025
FreeBSD 15.0-CURRENT

to test and I downloaded the duplicate uploads and did a diff
# diff config-backup-acb-pfSense.home.arpa-20250524103400.xml config-backup-acb-pfSense.home.arpa-20250524103500.xml 
269c269
<         <time>1748100780</time>
---
>         <time>1748100840</time>

It seems the issue may be with the fact that I had it scheduled for every minute. Increasing it to even 2 minutes makes it work as expected. I'm not sure if we should prevent setting a 1 minute backup time or add some code to handle this edge case.

Actions #6

Updated by Jim Pingle about 9 hours ago

  • Status changed from Feedback to Rejected
  • Target version deleted (2.8.0)
  • Plus Target Version deleted (25.03)

The backups are uploaded on a schedule that runs every minute. It might be a race condition of some sort but I don't think it's worth trying to stop. Trying to prevent the user from foot-shooting every possible combination of cron parameters is not going to be viable, there are tons of ways they could mess that up and not all predictable. There isn't any legitimate reason someone would need to set it that low in production or they could just configure it to back up after every change. People using the schedule typically want (much) less frequent backups, not more.

Actions

Also available in: Atom PDF