Max. backups sets, per backup plan, how many good backups stay at a target. The plugin deletes older ones on its own so that the target does not fill up.
You do not have to set anything here
This setting is optional. By default, 7 good backups stay per plan and target; the plugin deletes older ones on its own. You can adjust the number, but you do not have to for your website to get its backup.
What you need
- the Extended view. The switch is at the bottom left of the page. Only this view shows the Max. backups field.
Step 1: Open the plan
Open the Backup page. In the Backup plans tile, choose More … at the plan, then Edit.
Step 2: Set the number
- What is backed up is the content of the plan.
- Max. backups takes 1 to 99. The default is 7.
- Back up the database as a snapshot backs up all tables as of the same moment.
Enter the number and click Save. The new number takes effect after the next good backup of this plan.
How the plugin counts
- Per plan and per target. Each plan counts its own backups, at each target separately.
- Good backups only. A backup is good when it finished complete or with warnings. At a target it only counts if it is complete there. Failed and aborted backups do not count.
- Locked backups are not counted. The plugin never deletes them automatically.
- The newest good backup always stays.
- Started by hand counts too. A backup from Back up now or Run now belongs to its plan.
The short version is in the form of the plan, at the info icon next to Max. backups:
- How many good backups stay per target. When a new backup is complete and checked, the oldest beyond this number is deleted.
- The info icon next to the label shows the tooltip when the mouse pointer rests on it.
An example: Max. backups is set to 7, and seven good backups of the plan are stored at the target. After the eighth, the plugin deletes the oldest. If one of the eight is locked, only seven count, and all of them stay.
When deletion happens
The plugin deletes on its own, after every good backup: for the plan of that backup and only at the targets where the new backup has arrived. Only when the new backup is complete and checked at the target does the oldest go.
If something is deleted in the process, the main tile shows the line Deleting outdated backups. Afterwards the page reports the result:
- One old backup deleted. With several, the message names the number.
- The plugin never deletes because space is running low. If a backup no longer fits at a target, it skips that target and ends with warnings. If no target is left, it ends with Not enough free space.
- Backups of a deleted plan stay until you delete them by hand.
- The plugin never deletes imported and rediscovered backups automatically.
- With its last copy, a backup disappears from the list. Its log stays for as long as logs are kept.
Reading the “Targets and space” tile
The tile is in the Extended view on the Backup and Targets pages. When you open the page, it is folded. A click on the title line unfolds it.
- Hide details folds the tile again.
- The name of the target.
- The number of good backups stored at this target.
- The space they take.
- The free space at the target. The plugin knows it for local folders; otherwise there is a dash.
- Per plan, the counted backups and Max. backups, for example “Daily backup 7 / 7”. manual stands for backups without a plan.
The number per plan follows the rules above, so it counts without locked backups. The numbers of the plans together can therefore be smaller than the number of backups at the target. If the plan no longer exists, a dash follows the slash.
Backups without a plan
A backup without a plan is only made on the command line. Such backups form the group manual with its own number. You find it in the Extended view on the Settings page, in the Retention tile.
- Max. backups without a plan takes 1 to 99, the default is 7. The value is saved as soon as you leave the field.
If something does not work
| Message | What you can do |
|---|---|
| This value is out of range. | Enter a number from 1 to 99. An empty field counts as an error. |
| Deleting old backups failed. | The message is yellow and leads to the log with Log. Check the target on the Targets page with Test connection. |
Good to know
- If a check finds a backup damaged at a target, it no longer counts there. The plugin never deletes it automatically: Check a backup.
- If the folder at the target belongs to another installation, the plugin deletes nothing there: The website has moved or is a copy.
- If you want to keep a particular backup, for example before a big update, lock it.
See also
- Protect a backup from deletion
- Delete a backup
- Backup plans: tile and form
- The “Backup” page
- Create and manage backups with WP-CLI
On the command line
WP-CLI not set up yet? How to install WP-CLI.
With WP-CLI you see what the plugin would delete, and you delete it right away without waiting for the next backup. You also set both numbers here.
# Show what would be deleted now wp cloneworx-backup retention list # Delete now what exceeds Max. backups wp cloneworx-backup retention run # Delete for one backup plan only wp cloneworx-backup retention run --plan=plan-1 # Set Max. backups of a backup plan wp cloneworx-backup plan edit "Daily backup" --retention=14 # Set Max. backups without a plan wp cloneworx-backup settings set manual_retention 10