Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-22977

backup_maintenance using delete_amount is wrong in v16 PHP 7

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 15, 16
    • Fix Version/s: 15, 16
    • Component/s: Backup & Restore
    • Labels:
      None
    • Sprint:
      Sprint 64
    • ToDo:

      Description

      This bug is serious because it causes the most recent backup to be immediately deleted, meaning the only backups retained are older and older.

      backup_maintenance() uses ksort(SORT_NUMERIC) to order the files before removing 'stale' backups in excess of the delete_amount value.

      SORT_NUMERIC is a poor choice when using file names.  It gives somewhat unpredictable results, and PHP 7 effectively reserves the sort order compared with PHP 5.

       

      The current workaround is to turn of maintenance by amount/count.  However, if the user isn't aware of this bug, they will think they are doing successful backups, only to find when they need a backup that they only have backups prior to the upgrade to v16.

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  meghabm Megha BM
                  Reporter:
                  GogglesPisano Goggles Pisano
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    NextupJiraPlusStatus

                    Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.