• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Issue Customer (full) backup limits not enforced

gbotica

Regular Pleskian
Hi,

I have a new server running CentOS 7 and Plesk 17.5.3 MU6.

In the Plesk Admin Backup Settings page I have "Maximum number of full backup files to store" = 1.

However, when I login as a client to Plesk panel I can create as many full backups as I like. Note I am using full backups only, not incremental.

How do I limit the number of backups stored on the server by customers?

Thank you.
 
Have you checked directly on your backup storage that there are many full backup files but not only one?
 
And note, this option work only for scheduled backups. If you run scheduled backup with enabled "Maximum number of full backup files to store" = 1 option, all full backups created manually will be removed and only one, scheduled, created.
 
Yes, I've just checked that. Domain has 3 user backups (even though set to allow only 1x) and all 3 backups are present in /var/lib/psa/dumps/clients/... etc
 
And note, this option work only for scheduled backups. If you run scheduled backup with enabled "Maximum number of full backup files to store" = 1 option, all full backups created manually will be removed and only one, scheduled, created.

So, there is no limit to how many (manual) full backups a customer can create? In my installation, this appears to be the case. I have limited to 1 full backup in Backup Settings, back a customer can create 6 full backups??
 
I see only one way for this limit - set up disk space limit for customer :)
 
I see only one way for this limit - set up disk space limit for customer :)

That doesn't seem to be working either. I have Overuse Policy for the subscription set to "Overuse is not allowed". The customer can create unlimited backups and disk usage goes up to 400%, but nothing happens, and no backups are rotated.
 
Hi,

Over night the site was suspended due to disk space overuse. So, thank you - I understand how that works now.

So it seems that the only thing preventing a customer from creating endless full backups is the subscription disk space limit? Which, if set to "Over Use allowed - notify" will not do anything.

In any single day, up until the time of Plesk resource calculation, a customer could potentially create backup after backup, using many GBs of space -- and nothing would stop them -- that seems odd? There is no kind of "You have used your total number of backups" type message before making the backup?

Considering that domain backups can optionally be excluded from customers disk space calculation, it seems strange that there's so little control over backup rotation and lifecycle.

It also seems that with "Maximum number of full backup files to store" set to '1', a customer can set up a daily incremental backup that creates a full backup once a year - wouldn't that retain a year's worth of incremental backups? That would use a lot of disk space.

Is there anything availabel via CLI I could script to remove all customer full backups after X days?
 
You can attempt to use the command
/usr/local/psa/admin/bin/pmm-ras --rotate-dump --dump-rotation=<keep_dumps_count> --dump-specification=domains/<domain_name>/backup_info_<dump_date>.xml --dump-storage=/var/lib/psa/dumps --storage-structured
 
Hi,

Thanks very much for the tip. I can't get that working correctly though, I run the command, and get no output or any changes.

if we're rotating old backups, why do I need to specify a particular backup file in the command (--dump-specification)? Shouldn't it just remove all backups except for the most recent n, set with --dump-rotation? I would have also expected an option to remove all n oldest backups for a particular customer.

I have a customer backup, with 5x incremental backups + the intial full backup. So, I tried using the initial backup .xml file in the reference:

Code:
/usr/local/psa/admin/bin/pmm-ras --rotate-dump --dump-rotation=2 --dump-storage=/var/lib/psa/dumps --storage-structured --dump-specification=clients/CLIENTNAME/domains/DOMAIN.com/backup_info_1705180905.xml

But, nothing happens? The 6 backups remain.

Thanks for your assistance.
 
if we're rotating old backups, why do I need to specify a particular backup file in the command (--dump-specification)?
This is just a way to specify a customer (subscription) whose backups you are going to rotate.

But, nothing happens? The 6 backups remain.
The command takes into account full backups only and deletes them with their increments.
 
Also you can use the following command to delete a particular backup
/usr/local/psa/admin/bin/pmm-ras --delete-dump --dump-specification=domains/<domain_name>/backup_info_<dump_date>.xml
 
Hi,

It looks like I can loop through the '--get-dump-list' ouput and check creation date, and then delete backups that way.

It would be great to have a way to simply remove all customer backups older than n days, but this doesn't seem possible.

Also, it seems that
Code:
pmm-ras --rotate-dump ...
only affects scheduled backups, not manually created ones (even manually created incremental backups...).

Thanks very much for your help, once again.
 
Last edited:
Back
Top