Plesk

 How to remove Plesk backup files and their logs

Question

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.

   

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…

Exit mobile version