Articles in this section

How to remove Plesk backup files and their logs

Plesk for Windows kb: how-to Plesk for Linux ABT: Group A FR:PPM-2889

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.

 

Removing backups existing in Plesk

 

Via Plesk

 

  1. In Plesk, go to Tools & Settings > Backup manager (server-wide backups) or Websites & Domains > Backup Manager (domain backups).

  2. Choose a backup that should be deleted and click Remove. Backup files will be also removed from the system.


    Screenshot_2019-10-02_Backup_Manager_-_Plesk_Onyx_17_8_11_1_.png

 

Via a command-line interface

 

  • For Plesk on Linux

    1. Connect to a Plesk server via SSH.

    2. 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>

    3. 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

    1. Connect to a Plesk server via RDP.

    2. Start a command prompt as an Administrator.

    3. 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

    4. 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

    1. Connect to a Plesk server via RDP.

    2. Start a command prompt as an Administrator.

    3. 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>

    4. 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"

 

Removing old backup logfiles (Linux)

 

  1. Connect to a Plesk server via SSH.

  2. 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.

 

Removing backups that are not shown in Plesk, but exist physically on a server (Linux)

 

  1. Connect to a Plesk server via SSH.

  2. 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*' -ctime +XX -exec rm -rf {} +;

      where XX is a number of days before the current date.

 

Was this article helpful?

Comments

7 comments
Date Votes
  • I have lots of other files in the  /var/lib/psa -- some seems to be left over from migration days..

    Can't we delete them? The above commands did nothing

    # du -sh dumps/
    199G    dumps/

    drwxr-x---.   7 psaadm psaadm 208K May 26 09:41 .
    -rw-------    1 root   root   3.5M May 26 09:41 mysql.preresolve.20230526-094109.dump.gz
    -rw-------    1 root   root   5.7K May 26 08:39 mysql.preupgrade.apsc.18.0.52-18.0.52.2023
    0526-083923.dump.gz
    -rw-------    1 root   root   3.4M May 26 08:39 mysql.preupgrade.18.0.52-18.0.52.20230526-
    083920.dump.gz
    -rw-------    1 root   root   3.5M May 26 05:44 mysql.daily.dump.0.gz
    -rw-------    1 root   root   3.5M May 25 06:00 mysql.daily.dump.1.gz
    -rw-------    1 root   root   3.5M May 24 05:58 mysql.daily.dump.2.gz
    -rw-------    1 root   root   3.5M May 23 05:39 mysql.daily.dump.3.gz
    -rw-------    1 root   root   3.5M May 22 05:47 mysql.daily.dump.4.gz
    -rw-------    1 root   root   3.5M May 21 06:23 mysql.daily.dump.5.gz
    drwxr-x---    2 root   root   4.0K May 21 03:59 .run
    -rw-------    1 root   root   502K May 21 03:57 backup_info_2305070213_2305210212.xml
    -rw-r-----    1 root   root    781 May 21 03:57 backup_ext_performance-booster_2305070213_
    2305210212.tzst
    -rw-r-----    1 root   root   1.1M May 21 03:57 backup_ext_dist_performance-booster_230507
    0213_2305210212.tzst
    -rw-r-----    1 root   root   2.2M May 21 03:57 backup_ext_dist_docker_2305070213_23052102
    12.tzst
    -rw-r-----    1 root   root    214 May 21 03:57 backup_ext_traffic-monitor_2305070213_2305
    210212.tzst
    -rw-r-----    1 root   root   6.4M May 21 03:57 backup_ext_dist_traffic-monitor_2305070213
    _2305210212.tzst
    -rw-r-----    1 root   root     34 May 21 03:57 backup_ext_statistics-usage-manager_230507
    0213_2305210212.tzst
    -rw-r-----    1 root   root   491K May 21 03:57 backup_ext_dist_statistics-usage-manager_2
    305070213_2305210212.tzst

     

    0
  • turgut kalfaoglu could you please the exact command you applied here?

    0
  • Cannot delete anything at /var/lib/psa/dumps :(
    This guide did not work...

    0
  • hi Adel Csakvary

    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.

    Most likely you did not change the XX.

    Or are you receiving an error?

    0
  • I wonder if the best practice is still the usual home-brewed Bash script or a more structured and consistent approach. Every Linux-based distribution includes the systemd-tmpfiles-clean service.

    ❯ systemctl status systemd-tmpfiles-clean.timer
    ● systemd-tmpfiles-clean.timer - Daily Cleanup of Temporary Directories
       Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static; vendor preset: disabled)
       Active: active (waiting) since Tue 2025-02-25 12:50:09 CET; 1 day 2h ago
      Trigger: Thu 2025-02-27 13:05:08 CET; 22h left
         Docs: man:tmpfiles.d(5)
               man:systemd-tmpfiles(8)
    
    feb 25 12:50:09 myplesk.mydomain systemd[1]: Started Daily Cleanup of Temporary Directories.

     

    Wouldn't it be more advisable to use a configuration file like this:

    ❯ cat /etc/tmpfiles.d/plesk-dumps.conf
    # Clean /var/lib/psa/dumps/domain and /var/lib/psa/dumps/clients after 15 days
    D /var/lib/psa/dumps/domain  15d
    D /var/lib/psa/dumps/clients 15d
    
    # Clean /var/lib/psa/dumps/.discovered after 15 days
    D /var/lib/psa/dumps/.discovered 15d

    which leverages existing system services instead of relying on custom scripts?

     

    0
  • Hostmaster Scibile Network SA thank you for the recommendation. IF that solution works for you please use it.

    0
  • Hello Julian,

    Following a FTP server deletion, I have a backup 2025 11 12 00:14 listed in Plesk with "!" icon and no way to delete it.
    It doesn't appear with the /usr/local/psa/admin/bin/pmm-ras --get-dump-list | grep .xml command.
    The command /usr/local/psa/admin/bin/pmm-ras --verbose --debug --delete-dump --dump-specification=backup_info_2511120014.xml --session-path=/var/log/plesk/PMM has no effect.
    I tried files deletion in /var/log/plesk/PMM/ and /var/lib/psa/dumps including in subfolders with no success.
    Thank you for your help.
    Regards, Vincent

    0

Please sign in to leave a comment.