• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Plesk 18.0.30 do not do automatic clean up of the backups

DeamonMV

New Pleskian
Hello

We have Plesk 18.0.30 with configured Backup Manager to take backup at night. Creating backups works normal. But removing old backups not working.

I see that local, on server, present three full backups already

Code:
    <message>backup_info_2011280314.xml: </message>
    <message>backup_info_2011280314_2011290314.xml: </message>
    <message>backup_info_2011280314_2011300315.xml: </message>
    <message>backup_info_2011280314_2012010315.xml: </message>
    <message>backup_info_2011280314_2012020315.xml: </message>
    <message>backup_info_2011280314_2012030315.xml: </message>
    <message>backup_info_2011280314_2012040315.xml: </message>
    <message>backup_info_2012050314.xml: </message>
    <message>backup_info_2012050314_2012060314.xml: </message>
    <message>backup_info_2012050314_2012070315.xml: </message>
    <message>backup_info_2012050314_2012080315.xml: </message>
    <message>backup_info_2012050314_2012090316.xml: </message>
    <message>backup_info_2012050314_2012100315.xml: </message>
    <message>backup_info_2012050314_2012110316.xml: </message>
    <message>resellers/one/clients/kaka/domains/example.com/backup_info_2012111424.xml: </message>
    <message>resellers/one/clients/kaka/domains/example.com/backup_info_2012141110.xml: </message>
    <message>backup_info_2012150314.xml: </message>
    <message>backup_info_2012150314_2012160314.xml: </message>

But Backup Manager have configuration to keep 1 full backup

1608103547169.png
Am I right, that Max num of full back means that Backup Manager when done a second full backup he should delete previous full backup and his incremental backups?

How even possible to check any kind of log to check what plesk do about to clean up old backups.

I'll be glad to get any relevant information or question.
 
Delete the backup job and re-create it with the desired parameters. This will not delete existing backups, but it makes sure that the correct rotation data is being used.
 
Thank you for you replay

I didn't found backup job exactly, but i tried to disable backup and then active back again
by changing flag - "Active this backup task"
Maybe this will do the trick
1610981153919.png
 
Absolutely there is. Please go to /var/log/plesk/PMM and from there into the "backup" directory of any current backup, e.g.
backup-2021-01-30-05-37-04-228
You fill find two log files, backup.log and pmmcli.log. The pmmcli.log is a general and short log which normally has an exit code of zero. The backup.log might be more interesting. Check the tail of it, because old backups are deleted at the end of a backup cycle. If something goes wrong with deleting the old backups, it will be listed in the log. Successful deletion will also be listed. The backup log can be very verbose, but if the details are insufficient to find out what is going on, you can still enable debugging as described in
 
Peter thank you for you replay.

I found those logs. I checked backup logs for different date but in any of them I didn't found anything which is looks like "Deletion" of old backups.
I tried to find message with "ERR" and found only messages about not enough space. I had this problem because of deletion of backups not working respectivly.

Can you please write how should be looks like such message about deletion of the old backups?
 
I think it should be a log sequence similar to this:
...
[2021-01-31 22:36:21.026| 4730] INFO: pmm-ras finished. Exit code: 0
[2021-01-31 22:36:21.055| 4902] INFO: pmm-ras started : /usr/local/psa/admin/bin/pmm-ras --delete-dump --session-path=/usr/local/psa/PMM/sessions/2021-01-31-123058.580 --dump-specification=backup_info_2101252231_2101312232.xml
[2021-01-31 22:36:21.055| 4902] INFO: Repository '/home/dumps': Initializing...
[2021-01-31 22:36:21.055| 4902] INFO: Repository '/home/dumps': Initialized
[2021-01-31 22:36:21.055| 4902] INFO: Repository '/home/dumps': Get backup info from backup_info_2101252231_2101312232.xml
...
[2021-01-31 22:36:21.463| 4902] INFO: Repository '/home/dumps': Found 918 files for deleting
...

I would also address the error in your backup due to lack of space. It is absolutely thinkable that old backups are not deleted for that reason. Because it means that a new backup fails, and it would not be a good idea to delete old backups if a new backup has failed. So maybe you already found the reason for the behavior.

Not enough space can occur either for the local, the remote backup destination or for the temporary partition or path.
 
I made a search around all log files for this words "delete-dump" and I found this


Code:
migration.log.2021-01-31-034409:[2021-01-30 08:17:36.692| 6042] INFO: pmm-ras started : /opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101050314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM
migration.log.2021-01-31-034409:[2021-01-30 08:18:33.589| 6416] INFO: pmm-ras started : /opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101120314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM
migration.log.2021-01-31-034409:[2021-01-30 08:18:41.339| 6423] INFO: pmm-ras started : /opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101190313.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM
pmmcli.log.2021-01-31-034409:[2021-01-30 08:17:36.667|6034] INFO: stdin: <?xml version="1.0" ?><delete-dump-query><dump-specification><dumps-storage-credentials storage-type="local"><root-dir>/var/lib/psa/dumps</root-dir><file-name/></dumps-storage-credentials><name-of-info-xml-file>backup_info_2101050314.xml</name-of-info-xml-file></dump-specification><object-specification guid="272866e4-1992-4e08-b108-65d24dab38bb" owner-guid="272866e4-1992-4e08-b108-65d24dab38bb" type="server"/></delete-dump-query>
pmmcli.log.2021-01-31-034409:[2021-01-30 08:17:36.681|6034] INFO: Executing <subprocess[6042] '/opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101050314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM'>
pmmcli.log.2021-01-31-034409:[2021-01-30 08:18:32.879|6034] INFO: Execution of <subprocess[6042] '/opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101050314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM'> finished successfully.
pmmcli.log.2021-01-31-034409:[2021-01-30 08:18:33.555|6411] INFO: stdin: <?xml version="1.0" ?><delete-dump-query><dump-specification><dumps-storage-credentials storage-type="local"><root-dir>/var/lib/psa/dumps</root-dir><file-name/></dumps-storage-credentials><name-of-info-xml-file>backup_info_2101120314.xml</name-of-info-xml-file></dump-specification><object-specification guid="272866e4-1992-4e08-b108-65d24dab38bb" owner-guid="272866e4-1992-4e08-b108-65d24dab38bb" type="server"/></delete-dump-query>
pmmcli.log.2021-01-31-034409:[2021-01-30 08:18:33.567|6411] INFO: Executing <subprocess[6416] '/opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101120314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM'>
pmmcli.log.2021-01-31-034409:[2021-01-30 08:18:40.742|6411] INFO: Execution of <subprocess[6416] '/opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101120314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM'> finished successfully.
pmmcli.log.2021-01-31-034409:[2021-01-30 08:18:41.310|6421] INFO: stdin: <?xml version="1.0" ?><delete-dump-query><dump-specification><dumps-storage-credentials storage-type="local"><root-dir>/var/lib/psa/dumps</root-dir><file-name/></dumps-storage-credentials><name-of-info-xml-file>backup_info_2101190313.xml</name-of-info-xml-file></dump-specification><object-specification guid="272866e4-1992-4e08-b108-65d24dab38bb" owner-guid="272866e4-1992-4e08-b108-65d24dab38bb" type="server"/></delete-dump-query>
pmmcli.log.2021-01-31-034409:[2021-01-30 08:18:41.326|6421] INFO: Executing <subprocess[6423] '/opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101190313.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM'>
pmmcli.log.2021-01-31-034409:[2021-01-30 08:19:49.478|6421] INFO: Execution of <subprocess[6423] '/opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101190313.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM'> finished successfully.
This is not belong to "backup.log" or "pmmcli.log" of any folder of such format "backup-2021-01-04-03-13-48-667", but belong to files which is stored directly in the "/var/log/plesk/PMM".

I think this messages was produced when I did manual deleting of the old backups from the plesk web admin panel, but I'm not sure, because I did such clean up about two weeks ago, and here not messages about that clean up.

About problem with "lack of free space" - this problem was already two month ago, actually this happened when automatic removes of backup has been stopped working. All this time after, I check space by hand and do the clean up by hand((

Also I found that maximum number of full backup files to store was different in the "Schedule Backup Setting" and "Backup Settings". In fist one it was "1" in the second - "2". I made "1" for both.

Thank you your help.
 
Nothing has changed.

Maybe here exist some more thing to check?

Plesk still do not want to remove old backups.
 
This is not belong to "backup.log" or "pmmcli.log" of any folder of such format "backup-2021-01-04-03-13-48-667", but belong to files which is stored directly in the "/var/log/plesk/PMM".
But you will need the backup log to analyze the issue. There must be /backup-.... folders for each backup, and only in the logs in these folders you can find the reason for the behavior.
 
Peter thank you for you help.

But I cannot see if plesk did anything to make a clean up of the backups

For example, I found log records when I did manual clean up
In file /var/log/plesk/PMM/migration.log.2021-02-23-034405


Code:
[2021-02-22 10:18:33.714| 3501] INFO: pmm-ras started : /opt/psa/admin/bin/pmm-ras --delete-dump --dump-storage=/var/lib/psa/dumps/ --dump-specification=backup_info_2101260314.xml --owner-guid=272866e4-1992-4e08-b108-65d24dab38bb --session-path=/var/log/plesk/PMM
[2021-02-22 10:18:33.715| 3501] INFO: Repository '/var/lib/psa/dumps/': Initializing...
[2021-02-22 10:18:33.715| 3501] INFO: Repository '/var/lib/psa/dumps/': Initialized
[2021-02-22 10:18:33.715| 3501] INFO: Repository '/var/lib/psa/dumps/': Get backup info from backup_info_2101260314.xml
[2021-02-22 10:18:33.715| 3501] INFO: Repository '/var/lib/psa/dumps/': Get initial backup info for backup_info_2101260314.xml
[2021-02-22 10:18:33.715| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314/props
[2021-02-22 10:18:33.716| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314/storages
[2021-02-22 10:18:33.716| 3501] INFO: Read properties from xml backup_info_2101260314.xml
[2021-02-22 10:18:33.717| 3501] INFO: Repository '/var/lib/psa/dumps/': Validate backup backup_info_2101260314.xml
[2021-02-22 10:18:33.717| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314/props
[2021-02-22 10:18:33.718| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314/status_OK
[2021-02-22 10:18:33.718| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314/dumpresult_WARNINGS
[2021-02-22 10:18:33.720| 3501] INFO: Find incremental backups in '' for prefix 'backup' and base version 2101260314
[2021-02-22 10:18:33.808| 3501] INFO: Repository '/var/lib/psa/dumps/': Delete backup backup_info_2101260314_2102010315.xml
[2021-02-22 10:18:33.810| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314_2102010315/storages
[2021-02-22 10:18:33.810| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from .discovered/backup_info_2101260314_2102010315/props
[2021-02-22 10:18:44.777| 3501] INFO: Repository '/var/lib/psa/dumps/': Found 1221 files for deleting
[2021-02-22 10:18:44.778| 3501] INFO: Repository '/var/lib/psa/dumps/': Get info from domains/sportapi.5vm.de/.discovered/backup_info_2101260314_2102010315/storages
[2021-02-22 10:18:44.778| 3501] INFO: Repository '/var/lib/psa/dumps/': Put info to domains/sportapi.5vm.de/.discovered/backup_info_2101260314_2102010315/storages

But I can't if plesk do it by him self.
backup-2021-xxxx folder do not contain such records.

Maybe I can somehow check through server console, by open some file(config) and check that plesk really have "record" - to do clean up or not todo?
 
Unfortunately I have not yet seen a case where backup logs are not created at all, so I cannot help in this case.
 
Hi All,
I have same problem, if I configure to store backups to both server storage and FTP(S) storage, Plesk does not remove old backups from locale storage.
In log files I can't find anything regarding cleaning up old files.

Last lines in backup.log file:
...
[2021-03-11 07:19:48.132|13385] INFO: Added sign block for dump-index
[2021-03-11 07:19:48.132|13385] INFO: Added sign block for archive-index
[2021-03-11 07:19:48.136|13385] INFO: Ftp init url ftp://xxx.xxx.xxx.xxx/backup_2103110040.tar
[2021-03-11 07:19:48.188|13385] INFO: pmm-ras finished. Exit code: 0


Is that a bug or how can I fix that problem?
 
Hi All,
I have same problem, if I configure to store backups to both server storage and FTP(S) storage, Plesk does not remove old backups from locale storage.
In log files I can't find anything regarding cleaning up old files.

Did you find a fix for this? I've yet to implement this on my server and it will be a problem if it is still as you describe
 
how to delete file backups
/var/lib/psa/dumps/domains/website.xxx/backup_user-data_number11111.tzst
 
Back
Top