phpbu icon indicating copy to clipboard operation
phpbu copied to clipboard

FTP stepwise cleanup not working

Open cccaballero opened this issue 3 years ago • 0 comments

Hello, I have configured PHPBU to synchronize the backup files via FTP, and I have configured a cleanup on the FTP server in the following way:

"syncs": [
  {
    "type": "ftp",
    "options": {
      "host": "adapter:yii2:sync.host",
      "user": "adapter:yii2:sync.user",
      "password": "adapter:yii2:sync.password",
      "path": "adapter:yii2:sync.path",
      "passive": "adapter:yii2:sync.passive",
      "cleanup.type": "stepwise",
      "cleanup.daysToKeepAll": 0,
      "cleanup.daysToKeepDaily": 14,
      "cleanup.weeksToKeepWeekly": 0,
      "cleanup.monthToKeepMonthly": 12,
      "cleanup.yearsToKeepYearly": 5
    }
  }
]

The backups run daily and my goal is to have the last 14 backups and keep one monthly for the last 12 months and one yearly for the last 5 years.

That setting in the local cleanup seemed to be working fine, but moving it to FTP seems to be ignored and no files are being deleted on the FTP.

In case it's useful, I'm doing the local cleanup this way, so that no files remain:

"cleanup": {
  "type": "capacity",
  "options": {
    "size": "0B",
    "deleteTarget": "true"
  }
},

cccaballero avatar Dec 20 '22 21:12 cccaballero