Delete temp. backup files!
Please clean up temp. backup files from the dumps folder.
Failed backups (to FTP) remain in the dumps folder filling up the storage space.
This should not have to happen: please remove these files!
I am running a workaround cronjob script to delete them every day:
#!/bin/sh backupdumpsdelete#
# Delete backup more than 90 days old.
#
backupDir="/var/lib/psa/dumps"
#
daysToKeep=0
echo "Checking for files older than $daysToKeep days in $backupDir"
listOfFiles=find $backupDir -mtime +$daysToKeep
if [ ! -z $listOfFiles ]
then
echo "Found [$listOfFiles]"
else
echo "None found."
fi
for toDelete in $listOfFiles
do
echo "Deleting $toDelete"
rm -rf $toDelete
done
echo "Done."
Thanks!
Hello,
Thank you for your input. We do not consider this as a feature request but as a normal way for the backups: unnecessary or temporary files should be removed automatically. We already work on this direction, and all known bugs were delivered for Plesk Onyx 17.5 and Plesk Onyx 17.8.
Do not forget that on “Tools & Settings → Backup settings” there is a separate option “Save backups in the server storage if the upload to FTP fails” – it controls a part of this behavior.
I would recommend reporting each case with unnecessary backup files to our support department, we will check it carefully and fix.
-
mow - sourcetronic commented
To be fair, 1. and 2. are already implemented in 17.8.11. When my ftp storage is full, about two days later backup refuses to run due to insufficient space, and the space requirement is calculated quite defensively (it requires more than twice than what the resulting backup file actually uses), and I get a mail titled "An error occurred during the scheduled backup." containing "Not enough free disk space to backup selected objects. At least 212651.19 MBytes free disk space is required."
However this change seems to have dropped the "Unable to upload the backup to the FTP storage" mail that Plesk 17.0 used to send when ftp space was insufficient ... so now I only notice that ~2 days later when the backup prerequisite check fails with the above mail.
-
thorak commented
Check what carefully? No I'm afraid not. "unnecessary or temporary files should be removed automatically" Then why does Plesk not do it's own garbage cleanup?
This happens even if you are not using ftp to offload backups. The default configuration of plesk, by manner of backups, will eventually consume all available disk space until it's 100% full and processes start to fail and then plesk itself will no longer function because mysql ceases to function. Clearly with Plesk installed in order to manage the server with a gui (and without). Why on earth is this still an issue.
1. There should be a disk space check as a part of managing it's own backups.
2. There should be adequate notification when the amount of free disk space reaches a critical level. This can be calculated in hundreds of ways. Choose one. Even if all it does is check for n% of volume size free. Personally if a server volume reaches 60% of it's capacity, that's critical. Because at anything above %50 risk increases.
3. There should be adequate dashboard notification regarding backups and if they are destined to fail on the next run.
4. This has been brought to the attention of developers numerous times and has been a problem since around 2012 when Plesk 11.5 was supposed to resolve these issues.
5. This can almost classify plesk as a virus. Don't get me wrong, I love Plesk. But seriously if you loaded it up on someones server without them knowing eventually it will crash the server if not monitored or negated via bash/cron by a human. The only thing saving it from virus status is that it's not self replicating. Even then some would say it fits the classic definition.By default it's pre-configured to do the exact opposite of what it's intended purpose is! You are literally better off with a headless unmanaged box then installing plesk and leaving it alone.
Seriously, this is not that hard of a solve. Even if you took what your end users are asking for as a 'feature' a simple cron job installed as a default, that would at least make this no longer a potential cauase for downtime like I just got to fix today. Customer had 3 web sites down for 4 hours because of it.3 sites taking up 6gb of a 30gb volume and where was the other 80%?
So please consider it a normal way of how your application should behave. A server managment and monitoring platform should have on it's short list of features a way of self monitoring it's own behaviors such as not to choke a server to death.
7 years... come on. Take a day or two and write a mod that makes this go away!
In the mean time I'll share my one liner that gets the job done via bash/cron
<code>
find /var/lib/psa/dumps/domains/example.com/ -mtime +13 -type f -delete
</code>Google the phrase "plesk psa files crashing server" ... 46,000+ results. The exact same problem solved by workarounds. Dating back as far as 2013!
I was about to apologize in advance for this post, but decided I don't need to. I just spent nearly 2 hours repairing INNODB corruption and fixing this issue by supplying my script as a 'feature' of my business That resolved a long outstanding 'issue' with Plesk.
If I had more than 46 thousand customers having the same problem with such a core feature. I would write a mod that fixes it and poops golden unicorns every time a server doesn't fail because of it.
-
dreamer22 commented
also, plesk does not remove backup copies, pulled from ftp or sftp remote storage after restore. that means, it needs to remove those local files or they just unnecessary fill up local storage and impact server functionality.
thanks for the bash script! -
Nayef commented
Anonymous, Thank you for the #!/bin/sh
-
mow - sourcetronic commented
Also, at least send a mail when the ftp upload fails or backup runs into other problems!
I can see the "Warnings" in :8443/smb/backup/list/domainId/1 but did not get any mail about that. Not even when the backup totally failed because the leftover dump files from the previous days filled the server space such that there was not enough space for the new dump files.
Not even possible to re-combine and upload the dumps to ftp from the gui so that the incremental backup is complete again.This has been around for 2 1/2 years? A shame.
-
Anonymous commented
Pff Plesk is starting to become a hassle.
Run into exactly the same problem today... Why can't we monitor / manage in some way, the dump files from the control panel. At least let us know how much storage space it's using.... That shoudn't be hard the implement?
-
Javier commented
If a backup for external FTP fail to upload, this backup is stored in the server.
I suggest to retry to upload it up to success or user delete the backup, so we save server limited storage, and dont need to fix this by hand(delete or move each backup failed).