• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Need to remove backups on CentOS 7 server via SSH

seanfod

New Pleskian
Hello. I am new to this forum and to SSH really as i have always accessed my VPS via Plesk. I have a CentOS 7 VPS and it appears i have run out of disk space as i cannot access the Plesk control panel and WordPress websites are coming up with database connection errors now after attempting to backup a farly large WordPress site.

I knew that i was close to maxing out the disk space and feel pretty stupid now for not doing something sooner.

My question is, how can i free up disk space via SSH and how do i remove server backups via SSH?

Thank you in advance...
 
Hi @seanfod, thank you for your post. You can

1) Find out the location of your local backups:
# grep DUMP_D /etc/psa/psa.conf
Normally it is /var/lib/psa/dumps, but just in case it was modified it is better to check it in the configuration file first.

2) Then descend into that path, let's say it is /var/lib/psa/dumps
# cd /var/lib/psa/dumps

3) There you can see several daily and historical dump files that should not be removed because you might still need them, and you can see further paths like /clients and /domains. You are looking for the /clients path. Descend into it (# cd clients). From there you see further directories that are named like the user names on your Plesk.
Maybe you are only interested in the five backup directories that occupy the most space. Then simply descend into the "clients" directory and run
# du -hs * | sort -h | tail -n 5
All these directories contain the full backup data of these users. Let's say one of these paths is named "myuseraccount", then you can

4) remove that user path to remove all of the users backup information, e.g.
# rm -R -f myuseraccount
or
# rm -R -f /var/lib/psa/dumps/clients/myuseraccount
 
Hi @seanfod, thank you for your post. You can

1) Find out the location of your local backups:
# grep DUMP_D /etc/psa/psa.conf
Normally it is /var/lib/psa/dumps, but just in case it was modified it is better to check it in the configuration file first.

2) Then descend into that path, let's say it is /var/lib/psa/dumps
# cd /var/lib/psa/dumps

3) There you can see several daily and historical dump files that should not be removed because you might still need them, and you can see further paths like /clients and /domains. You are looking for the /clients path. Descend into it (# cd clients). From there you see further directories that are named like the user names on your Plesk.
Maybe you are only interested in the five backup directories that occupy the most space. Then simply descend into the "clients" directory and run
# du -hs * | sort -h | tail -n 5
All these directories contain the full backup data of these users. Let's say one of these paths is named "myuseraccount", then you can

4) remove that user path to remove all of the users backup information, e.g.
# rm -R -f myuseraccount
or
# rm -R -f /var/lib/psa/dumps/clients/myuseraccount
Many thanks Peter. Much appreciated :)
 
Back
Top