In the menu of a target you check all the backups stored there in one pass. You also clean up leftovers that an aborted job left behind at the target.
Opening the menu of the target
Open the Targets page and click More … in the row of the target.
- Test connection
- Check the backups at this target appears only if backups are stored at the target.
- Clean up leftovers at this target appears for target types that can list their files.
- Find backups at this target
- Edit
- Remove
Checking and cleaning up run as a job. Only one job runs at a time; otherwise the page reports A job is already running.
Checking the backups at a target
Step 1: Start the check
In the menu, click Check the backups at this target. The plugin checks every backup at this target, the newest first.
Step 2: Follow the progress
- The progress: Checking backup, then the backup the check is currently working on (Backup … of …), the amount checked and the remaining time.
- Abort check stops the check at the next step.
At the beginning, instead of the time, calculating the remaining time … appears. The plugin reads a local folder in place. From an external target it fetches one part after another into its work folder, checks it and deletes it there again.
Step 3: Read the result
| Message | Meaning |
|---|---|
|
green All … backups at “…” checked: readable and complete. |
Everything is fine. |
|
red Check at “…”: … of … backups damaged or incomplete; the backup list marks them with a red cross. |
The log lists the affected parts. For a restore, use a backup without a red cross. |
|
yellow Check at “…”: the target did not answer. |
At least one backup could not be checked. It does not count as damaged because of this. Test the connection and start the check once more. |
|
yellow Check aborted. |
You aborted the check. |
|
red Check failed. |
The check itself failed. Look in the log. |
If the target did not answer, the message looks like this:
- The result: the target did not answer. Below it are the cause and the original message from the client.
- Log opens the log of the check.
In yellow and red messages, Log takes you to the log of the check. On the Backup page, a mark then appears in front of the date of every checked backup: a green tick or a red cross. The tooltip at the mark shows the date of the last check.
What is checked
The check reads a backup the way a restore would read it, and writes nothing back:
- Every file of the backup is stored at the target and has the expected size.
- The info file of the backup is valid.
- Every part has the size and the checksum stated in the info file.
- Every block can be read and unpacked, and the number of entries is correct. The database is included.
What a damaged backup means
If the check finds damaged or incomplete backups, the message is red:
- The result: how many backups at this target are damaged or incomplete.
- Log opens the log of the check. It lists the affected parts.
If a backup at this target fails the check, it no longer counts there for Max. backups. The plugin never deletes it automatically: it stays until you delete it by hand.
Cleaning up leftovers at a target
What a leftover is
A job that ends midway, for example at a limit of the server, can leave behind a folder at the target that never becomes a backup. A leftover is a folder with a job name
- that has no info file,
- that does not belong to the running job
- and that the list of backups at this target does not include.
An unfinished upload also counts as a leftover. The cleanup never touches anything the list of backups knows. A folder with an info file that the list does not know is not a leftover but a backup: it stays. You add it to the list with Find backups at this target.
Such a folder is also left behind if you take a backup out of the list with Only remove the entry from the list; nothing is deleted at the targets. while its files are still stored at the target. The cleanup does not touch it. The plugin finds it again when you save this target on the Targets page and the connection test succeeds, or when you choose Find backups at this target in the menu of this target. It then adds the backup to the list again, on its own or via the tile Backups found at “…”; afterwards the Plan column shows reclaimed. More on this: Delete a backup.
Step 1: Start the cleanup
In the menu, click Clean up leftovers at this target. The progress display appears below the status tile.
- The progress: Cleaning up leftovers, then how many entries are done, the size and the remaining time.
- Abort cleanup stops the cleanup at the next step.
Step 2: Read the result
| Message | Meaning |
|---|---|
|
green No leftovers at “…”. |
There was nothing at the target that had to be removed. |
|
green Leftovers at “…” cleaned up: … folders, …. |
The message shows the number of removed folders and the space that was freed. |
|
yellow Cleanup at “…”: the target did not answer. |
The plugin could not search for leftovers at the target. Test the connection and start again. The same message appears in the case of a fingerprint conflict: The website has moved or is a copy. |
|
red Cleanup at “…”: … files could not be removed. See the log. |
Log in the message takes you to the details. After an abort, the same message appears in yellow. |
If the plugin removed leftovers, the message looks like this:
- The result: how many folders with leftovers the plugin removed and how much space was freed by that.
The cleanup also runs on its own
After every valid backup, the plugin cleans up at the targets at which this backup arrived. The same run removes old files from the plugin’s work folder on the web server: everything that has not been touched for an hour and does not belong to the running job.
Good to know
- Backups are not checked on a schedule. The plugin already verifies every part while writing it; the check is meant for cases of doubt.
- You check a single backup on the Backup page: Check a backup.
- At an S3 target, an upload that was never finished keeps taking space at the service. The cleanup aborts such uploads, as far as the service lists them.
See also
- The “Targets” page
- Progress, messages and log
- Read the log
- Find backups again after a reinstallation
- Manage targets with WP-CLI
On the command line
WP-CLI not set up yet? How to install WP-CLI.
Both tasks also work with WP-CLI. The check prints one line per backup with the result. With --background, the command only starts the job; the website then continues it by itself.
# Check the backups at a target wp cloneworx-backup target check sftp-1 # Only show which leftovers the cleanup would remove wp cloneworx-backup target cleanup sftp-1 --dry-run # Clean up leftovers at a target wp cloneworx-backup target cleanup sftp-1