Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
-
How to remove Plesk backups?
-
How to remove old Plesk backup logfiles?
-
Backups have been removed from Plesk, but their files and logs exist on the file system. How to remove these backup files and logs?
Answer
Note: It is possible to set a period of time after which backups will be removed automatically. In addition, it is possible to limit the number of backups to store.
When a scheduled backup task is completed successfully, the corresponding log files are deleted automatically.
Via Plesk
-
In Plesk, go to Tools & Settings > Backup manager (server-wide backups) or Websites & Domains > Backup Manager (domain backups).
-
Choose a backup that should be deleted and click Remove. Backup files will be also removed from the system.
Via a command-line interface
-
For Plesk on Linux
-
Connect to a Plesk server via SSH.
-
Find the backup_infoXXXX.xml file using a backup creation date:
# /usr/local/psa/admin/bin/pmm-ras --get-dump-list | grep .xml:
In this example, the domain level backup was created on 10.08.2019 (19.08.10):
# /usr/local/psa/admin/bin/pmm-ras --get-dump-list | grep .xml:
<message>domains/example.com/backup_info_1908101555.xml: </message> -
Delete the backup by specifying the corresponding *.xml file. For example:
# /usr/local/psa/admin/bin/pmm-ras --verbose --debug --delete-dump --dump-specification=backup_info_1908101555.xml --session-path=/var/log/plesk/PMM
-
-
For Plesk Obsidian on Windows Server
-
Connect to a Plesk server via RDP.
-
Find the backup_infoXXXX.xml file using a backup creation date:
C:\> "%plesk_bin64%"\pmm-ras.exe --get-dump-list | findstr .xml:
In this example, the domain level backup was created on 22 July 2020:
C:\> "%plesk_bin64%"\pmm-ras.exe --get-dump-list | findstr .xml:
<message>backup_info_2007220826.xml: </message>If Plesk was installed into a custom location, replace C:\Program Files (x86) in the command above with the custom location
-
Remove the backup by specifying the corresponding *.xml file. For example:
C:\> "%plesk_bin64%"\pmm-ras.exe --verbose --debug --delete-dump --dump-specification=backup_info_2007220826.xml
-
-
For Plesk Onyx or earlier on Windows Server
-
Connect to a Plesk server via RDP.
-
Find the backup_infoXXXX.xml file using a backup creation date:
C:\>"%plesk_bin%/pmm-ras" --get-dump-list | findstr .xml:
In this example, the domain level backup was created on 10.08.2019 (19.08.10):
C:\>"%plesk_bin%/pmm-ras" --get-dump-list | findstr .xml:
<message>domains/example.com/backup_info_1908101555.xml: </message> -
Remove the backup by specifying the corresponding *.xml file. For example:
C:\> "%plesk_bin%\pmm-ras.exe" --verbose --debug --delete-dump --dump-specification=backup_info_1908101555.xml --session-path="%plesk_dir%PMM"
-
-
Connect to a Plesk server via SSH.
-
Delete directories with old backup files created before a desired date from
/var/log/plesk/PMM/
:# find /var/log/plesk/PMM/ -name 'backup*' -type d -ctime +XX -exec rm -rf {} +;
where XX is a number of days before the current date.
-
Connect to a Plesk server via SSH.
-
Delete backup directories and files created before a desired date from
/var/log/plesk/PMM/
and/var/lib/psa/dumps
:-
Remove backup logfiles:
# find /var/log/plesk/PMM/ -name 'backup*' -type d -ctime +XX -exec rm -rf {} +;
-
Remove backup files:
# find /var/lib/psa/dumps -name 'backup*' -type f -ctime +XX -exec rm -rf {} +;
where XX is a number of days before the current date.
-
Comments
9 comments
I'm not sure if there is an equivalent for Windows, but if there isn't it would be nice to see one as I have several clients that have been converted from reseller to customers in Plesk on Windows
After all that was written above, I have a question:
Plesk stores all my backups automatically on an external FTP-server. Within a long time there are many files in /var/lib/psa/dumps. Is there a problem, if I delete the content of this folder completely via SSH as root?
Thanks in advance
Joe
Hello @Steven,
The GUI steps from this article are identical for Linux and Windows.
Command-line solution for removing backups is also in place.
Hello,
I've removed old files this way, but they still are on the hard drive (and not in the list anymore). I've tried to manually remove them with "Diskspace usage viewer" and it says they can't be removed. What should I do?
Thanks.
Thanks a lot Anton !
Hello Gabriel, the command below has params:
find /var/log/plesk/PMM/ -name 'backup*' -type d -ctime +XX -exec rm -rf {} +;
If any files left means they either do not match name pattern or do not match number of dates before the current date.
Consider modifying scripts according to your needs to remove these files.
Anton Maslov
is not shouldn't be type f
find /var/log/plesk/PMM/ -name 'backup*' -type f -ctime +XX -exec rm -rf {} \;
Hello Greg
We're removing the whole directories, that's why "-type d".
Carlos Dias
If you're an admin of this Plesk installation, you'll be able to remove them from Tools & Settings > Backup Manager.
Boa tarde,
Como posso apagar todos os backups? O PLESK apenas me deixa selecionar o primeiro. Como Fazer?
Please sign in to leave a comment.