• 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

Remove Plesk Backup via Command Line?

Dan_Letsche

New Pleskian
Is there a command line way of removing Plesk backups?

I'm looking for the command line equivalent of these steps: Log into Plesk as the server admin > "Tools & Settings" > "Tools & Resources" > "Backup Manager" > check a backup and click "Remove".

If it's helpful, here's why I'm curious... we have a script that copies the contents of "/var/lib/psa/dumps/" to Amazon S3 for long-term storage of backups. It runs nightly after a scheduled Plesk backup. Once that script completes successfully, we'd like to delete the Plesk backup to free up disk space. We have Plesk's "Maximum number of backups in the repository" set to 1. But Plesk appears to keep that backup around while creating a new backup (which makes some sense). This is causing us trouble because the server does not have enough disk space for two backups. As a temporary solution, I'm manually deleting the backup each day through the Plesk admin, but would like to automate it if possible. If automation is overly complex/risky, we'll look at upping our disk space instead.
 
Bad suggestion. Records in psa database about this backup should be correctly removed too.

Thank you for clarifying that. We were wondering if Plesk stored anything in the database (or if it just read that directory). We're going to give the API route a shot.

Thanks again!
 
Back
Top