Backup history doesn't make sense?

I’m having some trouble getting the backup module (v15.0.8.94) to behave the way I want to. I want it to run daily backups to my NAS, keep the last two weeks’ worth of backups, and discard any that are older. What should be the relevant settings are these:


Of note, I’ve set “Delete after Days” to 14 days, but after I save those settings it reverts to “Unlimited” (and maybe this is the source of the problem).

What actually happens, though, is that the first 13 backups are kept, and the last one (the 14th) is replaced daily by the new one. Here’s the file listing in the backup directory yesterday:

root@freenas2[/mnt/tank/pbxbackup/pbx/backups]# ll -h
total 1078739
drwxr-xr-x  2 pbx  nobody  uarch   17B May 18 23:59 ./
drwxr-xr-x  4 pbx  nobody  uarch    4B May 12 18:19 ../
-rw-------  1 pbx  nobody  uarch   70M Apr 28 23:59 20200428-235902-1588132742-15.0.16.49-129127641.tar.gz
-rw-------  1 pbx  nobody  uarch   70M Apr 30 12:38 20200430-123803-1588264683-15.0.16.42.1-257050481.tar.gz
-rw-------  1 pbx  nobody  uarch   70M Apr 30 23:59 20200430-235902-1588305542-15.0.16.49-628085989.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  1 23:59 20200501-235902-1588391942-15.0.16.49-2020124627.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  2 23:59 20200502-235901-1588478341-15.0.16.49-1933551368.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  3 23:59 20200503-235902-1588564742-15.0.16.49-196750022.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  4 23:59 20200504-235902-1588651142-15.0.16.49-318479037.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  5 23:59 20200505-235901-1588737541-15.0.16.49-2054102394.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  6 23:59 20200506-235901-1588823941-15.0.16.49-989429145.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  7 23:59 20200507-235901-1588910341-15.0.16.49-1654835288.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  8 23:59 20200508-235901-1588996741-15.0.16.49-2046017648.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  9 23:59 20200509-235901-1589083141-15.0.16.49-1573217068.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May 10 23:59 20200510-235901-1589169541-15.0.16.49-489725203.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May 11 23:59 20200511-235901-1589255941-15.0.16.49-1910246724.tar.gz
-rw-------  1 pbx  nobody  uarch   71M May 18 23:59 20200518-235901-1589860741-15.0.16.49-1324028089.tar.gz

…and here’s the same directory today:

root@freenas2[/mnt/tank/pbxbackup/pbx/backups]# ll -h
total 1078979
drwxr-xr-x  2 pbx  nobody  uarch   17B May 19 23:59 ./
drwxr-xr-x  4 pbx  nobody  uarch    4B May 12 18:19 ../
-rw-------  1 pbx  nobody  uarch   70M Apr 28 23:59 20200428-235902-1588132742-15.0.16.49-129127641.tar.gz
-rw-------  1 pbx  nobody  uarch   70M Apr 30 12:38 20200430-123803-1588264683-15.0.16.42.1-257050481.tar.gz
-rw-------  1 pbx  nobody  uarch   70M Apr 30 23:59 20200430-235902-1588305542-15.0.16.49-628085989.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  1 23:59 20200501-235902-1588391942-15.0.16.49-2020124627.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  2 23:59 20200502-235901-1588478341-15.0.16.49-1933551368.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  3 23:59 20200503-235902-1588564742-15.0.16.49-196750022.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  4 23:59 20200504-235902-1588651142-15.0.16.49-318479037.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  5 23:59 20200505-235901-1588737541-15.0.16.49-2054102394.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  6 23:59 20200506-235901-1588823941-15.0.16.49-989429145.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  7 23:59 20200507-235901-1588910341-15.0.16.49-1654835288.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  8 23:59 20200508-235901-1588996741-15.0.16.49-2046017648.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May  9 23:59 20200509-235901-1589083141-15.0.16.49-1573217068.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May 10 23:59 20200510-235901-1589169541-15.0.16.49-489725203.tar.gz
-rw-------  1 pbx  nobody  uarch   70M May 11 23:59 20200511-235901-1589255941-15.0.16.49-1910246724.tar.gz
-rw-------  1 pbx  nobody  uarch   71M May 19 23:59 20200519-235902-1589947142-15.0.16.49-1665288868.tar.gz

As you can see, there are the same backups from 28 Apr - 11 May, but the one from 18 May has been replaced by one from 19 May. I’d expect that yesterday I would have had backups from 5-14 May, and today I’d see them from 6-19 May. How do I make this behave as I expect it to?

Anyone? Is there a setting I’m missing, or is this buggy behavior?

Hi @danb35 may be need to investigate further so request you to please raise JIRA at issues.freepbx.org and provide steps to reproduce issue and /var/log/asterisk/backup.log as well.

thanks.

I think I probably will, though it turns out I’m encountering an even more fundamental issue. After some amount of time (perhaps after a backup has successfully run?), no changes to the backup configuration are saved. I’d observed in my OP that I wasn’t able to change the “Delete after days” field–I could change it, but once I clicked the Save button and then edited the settings again, it would revert to whatever it was before. But looking closely at the backup logs, I realized it was saving to my NAS via FTP, not via SSH–and when I tried to make that change, it also didn’t “stick.”

So I deleted that backup job and created a new one with the same settings a few hours ago. I was able to change settings, and have those changes stick, for a while. Now, however, they don’t. That seems like a bigger problem, even though it isn’t directly related to my topic.

But to clarify, since you’re suggesting opening an issue, would I be correct in understanding that:

  • As far as you can see, the settings I’ve posted should do what I want them to do, and
  • There aren’t other common things that would need to be set to make this happen?

Edit: Here’s the ticket for the “can’t change settings” issue:
https://issues.freepbx.org/browse/FREEPBX-21542

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.