The plugin never deletes a locked backup automatically, and nobody deletes it by hand by accident either. That way, for example, the backup from before a big update stays until you unlock it.
Step 1: Lock the backup
Open the Backup page. In the Backups list, click More … in the row of the backup, then Lock backup. The lists on the Overview and Restore pages have the entry too.
- Restore takes you to the page where you restore the backup.
- Check backup checks whether the backup is readable and complete.
- Lock backup locks the backup immediately, without a confirmation dialog.
- Download only appears for a backup that is stored at a local target.
- Log opens the log of the backup.
- Delete backup deletes the backup after a confirmation prompt.
A backup can be locked if it is complete at one target or more. For a failed or aborted backup, the entry is not available.
Step 2: Recognise the padlock
After locking, a padlock appears in front of the date of the backup. If you point the mouse pointer at it, a tooltip appears. It also appears when you tap the padlock or reach it with the keyboard.
- Locked: this backup is never deleted automatically and is not counted for “Max. backups”. It can only be deleted by hand after “Unlock backup”.
What the lock does
- Never deleted automatically. After every valid backup, the plugin deletes the oldest backups that exceed Max. backups. It leaves a locked backup where it is.
- Not counted. Besides the locked backups, as many unlocked ones are kept as Max. backups specifies. The target can then hold more backups than this number.
- Cannot be deleted by hand. This applies in the browser and on the command line. For a locked backup, the confirmation prompt before deletion offers no Delete.
- Also while the plugin is deleting. The lock also holds if you set it while the plugin is deleting old backups. If deleting this backup at a target has already begun, the plugin refuses the lock; above the list, in red, it reads The backup is being deleted at a target right now; it cannot be locked any more.
- Protected when a target is removed. A target that holds locked backups cannot be removed together with its backups.
- Protected when a removed target is deleted permanently. If a locked backup refers to a removed target, the entry of that target cannot be deleted permanently until you unlock the backup. More on this: Remove a target.
- This backup is locked. Unlock it first; then it can be deleted.
- Cancel closes the confirmation prompt. There is no Delete button here.
Unlocking the backup
The lock stays until you remove it, in the same way you set it. In the row of the backup, click More …, then Unlock backup.
- Unlock backup is in the menu of a locked backup in the place of Lock backup.
The padlock disappears. The backup counts for Max. backups again and can be deleted.
After unlocking, the backup may be deleted
If the backup is among the oldest of its plan, the plugin deletes it after the next valid backup of this plan if it exceeds Max. backups. The newest valid backup is never deleted.
If something does not work
| Message | What you can do |
|---|---|
| This backup is locked. Unlock it first; then it can be deleted. | Choose Unlock backup and delete the backup afterwards. |
| … locked backups are stored at this target. Unlock them first to remove the target together with its backups; otherwise the backups stay where they are. | The notice is in the confirmation prompt when you remove a target. Unlock the backups at this target. Or remove the target and leave its backups where they are. |
Good to know
- The lock applies to the backup at all its targets.
- A locked backup keeps taking its space at the target. The plugin never deletes because space is running low.
- You can check, download and restore a locked backup like any other.
See also
- Define how many backups are kept
- Delete a backup
- Remove a target
- 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.
Locking and unlocking also work with WP-CLI. You specify a backup by its job name; backup list shows it at the start of every line. The line of a locked backup ends with locked.
# Show backups with job names; locked ones carry “locked” wp cloneworx-backup backup list # Lock a backup wp cloneworx-backup backup lock <Job> # Unlock the backup wp cloneworx-backup backup unlock <Job>