On the Restore page you put a backup back onto this website: the database, the files or both. Here you choose the backup, read the pre-check, start the restore and then decide whether to keep it or undo it.
Everything that takes time happens alongside the running website. The switch-over itself only takes a moment. Afterwards the previous state is kept for 7 days: during that time there is a rollback.
A restore replaces the current state
The backup replaces the current state of the chosen areas. The tables of the database come from the backup: whatever has been added to these tables since the backup is missing afterwards. The plugin itself with its folders and tables and the file wp-config.php are never restored.
The page at a glance
- Restore is the menu item of the page, in the WordPress menu under cloneworx.
- The main tile shows the last valid backup. During a restore it shows the progress, afterwards the open rollback.
- Restore latest backup opens the tile Prepare restore with the last valid backup.
- Import from file opens the tile for importing a backup file.
- Backups is the list of backups. On this page it is the selection for the restore.
- More … opens the menu of a backup.
- Show more adds the next 7 rows to the list.
- Extended switches to the view with all details. The choice applies to all pages of the plugin.
When needed, the message of the page and one of the two tiles Prepare restore and Import from file appear below the main tile. Only one of the two tiles is open at a time.
The main tile
The main tile has three states:
| State | What the tile shows | Buttons |
|---|---|---|
| ready | Title Restore, below it Last valid backup with date, size, targets and type. | Restore latest backup and Import from file |
| restore running | Title Restore is running, the step, a bar and the progress of the running phase. | Cancel, until the switch-over begins |
|
yellow rollback open |
Title Restore applied, when the restore was applied and until when it can be undone. Below that it shows what the restore removed because it was not in the backup, and the comparison of the file wp-config.php with the backup. | Delete the way back and Undo restore |
- A valid backup is one that is complete or complete with warnings. The last valid backup shown in the tile is the newest valid backup that is still stored completely at one target or more.
- If there is no such backup, the tile reads No valid backup yet: nothing to restore. The button Restore latest backup is then not shown.
- If another job is running right now, for example a backup, Restore latest backup is blocked. Only one job runs at a time.
- For today, yesterday and tomorrow the main tile uses the word instead of the date. The lists always show the full date.
- If the page cannot load the state, the main tile shows the message from the server in red. If it cannot load the list, the message is shown in red above the list.
The list of backups
- The line shows the last valid backup with date, size, target and type.
- Restore latest backup
- Import from file
- You sort the list with the header row: a click on a column heading sorts by this column, a second click reverses the order. The triangle marks the sorted column.
- The padlock marks a locked backup.
- PROThe key marks an encrypted backup. More about this: Encrypt backups.
- The dot shows the result of the backup: green for complete, yellow for with warnings, red for failed.
- The green tick means: the last check found the backup readable and complete. A red cross means: damaged or incomplete.
- More … opens the menu of this row.
- Show more adds the next 7 rows.
The columns are called Date, Size, Targets and Type. The column Type reads Full if the backup ended complete or with warnings, otherwise the status: Failed, Aborted or Running. When the page opens, the newest backup is at the top.
- The list shows 7 rows. To the right of Show more there is Show all, which shows all backups at once. If more than 7 rows are shown, Show less goes back to the first 7.
- The Backups tile is the same as on the Backup page: with the filters in the Extended view and, with cloneworx Backup Pro, with Select several at the bottom left. On the Restore page the tile cannot be collapsed.
- An aborted backup has a grey dot, a running one a spinning ring.
- If the list is empty, it reads No backups yet.
- If the list becomes too narrow, it hides the column Plan first, then the column Size.
- The lock and the tick have a tooltip: it explains their meaning when you point the mouse at them or tap them.
The menu of a backup
- Restore opens the tile Prepare restore with this backup.
- Lock backup protects the backup from automatic deletion. For a locked backup the entry is called Unlock backup.
- Log opens the log of the backup.
- The menu is the same as on the Backup page. It also contains Check backup, Download and Delete backup. Restore and Lock backup appear only for a valid backup that is stored completely at one target or more.
- Which entries the menu shows for which backup is described here: The “Backup” page. The progress of Check backup is shown at the top in the main tile Restore.
- Restore in the menu of a backup on the Backup page or on the Overview page leads here and opens the preparation for exactly this backup.
- As long as a restore is running or a rollback is open, Restore does not open the preparation. A new restore can only begin once you have kept or undone the open one. The page then reports in red: A restore still has an open way back. Delete the way back or undo the restore; only then can another backup be restored.
Prepare restore
Restore latest backup and the entry Restore in the menu open the same tile. The preparation does not change anything on the website yet.
- Dismiss closes the tile.
- Selected backup shows the date, size, targets and type of the backup.
- In the Compact view the scope is always the whole backup. The line lists its content.
- Pre-check is the list of the nine points with their result. Run pre-check next to it repeats the pre-check by hand.
- Start restore opens the confirmation dialog. The button is blocked as long as the pre-check is running or a point blocks the start.
- Cancel closes the tile without changing anything.
After the scope and below the buttons there are two notes that apply to every restore: wp-config.php is never restored. and You may need to log in again afterwards.
Scope and switches in the Extended view
- The checkboxes show the roots of the backup. What is ticked is restored.
- wp-config.php is never restored.
- Do not restore WordPress core leaves out the WordPress core.
- Do not restore drop-ins (object-cache.php, advanced-cache.php, db.php) leaves out these three files.
- Do not restore .htaccess, web.config, .user.ini leaves out these three files.
- Remove everything that is not in the backup makes the restore remove files in the uploads and in the root folder and tables of this website that the backup does not contain. The label has a dotted underline and explains the switch in a tooltip.
- Leave out damaged entries (otherwise a damaged entry stops the restore) restores the backup without its damaged entries.
- Leave out entries that cannot be created (otherwise such an entry stops the restore) restores the backup without the entries that could not be created.
A root is a named area of the website, for example the plugins or the uploads. The tile shows only the roots that are in this backup: Database, wp-content (everything else), Plugins, Themes, Must-use plugins, Uploads, WordPress core and Root folder files (.htaccess, robots.txt, …). If no checkbox is ticked, the whole backup is restored. The confirmation dialog shows what is actually restored before the start. The files of the web root have no checkbox of their own; these files belong to Root folder files (.htaccess, robots.txt, …).
| Switch | Default | Effect |
|---|---|---|
| Do not restore WordPress core | Same website: not ticked. Different website or unknown origin: ticked. | The core stays as it is on this website. If the backup does not contain the core, the switch is blocked. |
| Do not restore drop-ins (object-cache.php, advanced-cache.php, db.php) | As for the core. | The three files from the backup are left out. This website’s own drop-ins move from wp-content (everything else) to the previous state during the restore, like other entries there that do not come from the backup. |
| Do not restore .htaccess, web.config, .user.ini | As for the core. | The three files stay as they are on this website. |
| Remove everything that is not in the backup | not ticked | By default, whatever is not in the backup stays: files in the uploads and in the root folder stay where they are, tables of this website stay in place. If the switch is ticked, the restore removes them, but only in the roots it restores: files if it restores the root Uploads or the root Root folder files (.htaccess, robots.txt, …), tables if it restores the root Database. The restore does not delete them in the process: files and tables move to the previous state. Undo restore brings everything back, Delete the way back deletes it permanently. What the switch does not cover is described further down in a section of its own. |
| Leave out damaged entries (otherwise a damaged entry stops the restore) | not ticked | By default, a damaged entry ends the restore before the switch-over. If the switch is ticked, the restore continues without just these entries. If it has left out entries, it ends with warnings. |
| Leave out entries that cannot be created (otherwise such an entry stops the restore) | not ticked | By default, an entry that cannot be created in the build folder ends the restore before the switch-over: no space, no permission, or a name that the file system already treats as taken. If the switch is ticked, the restore continues without just these entries. |
The pre-check determines whether the backup comes from this or from another website. The switches therefore always show what will happen: your choice, or otherwise the default set by the pre-check. Until the first pre-check has answered, a note is shown in their place saying that the pre-check is running and determines the defaults.
For the backup of a different website, the first three switches are ticked after the pre-check:
- Do not restore WordPress core is ticked: this website keeps its own core.
- Do not restore drop-ins (object-cache.php, advanced-cache.php, db.php) is ticked: the three files from the backup are left out.
- Do not restore .htaccess, web.config, .user.ini is ticked: this website keeps its own three files.
More on this: Restore a backup on another website.
What the switch “Remove everything that is not in the backup” covers and what it does not
By default, a restore leaves in place whatever is not in the backup in the uploads, in the root folder and in the database. With the switch Remove everything that is not in the backup the restore removes it. For core, plugins, themes, must-use plugins and wp-content (everything else) the switch changes nothing: there, every restore moves whatever is not in the backup to the previous state; whatever was excluded during the backup stays where it is. This also applies inside an entry that the restore switches as a whole, for example for a .git folder in a theme: the plugin copies such entries into the new state before the switch-over.
- The switch takes effect only in the roots that the restore restores: it removes files if the restore restores the root Uploads or the root Root folder files (.htaccess, robots.txt, …), and tables if the restore restores the root Database.
- Removing means here that files and tables move to the previous state. Undo restore brings everything back. Delete the way back deletes it permanently, and so does the automatic deletion of the rollback after 7 days.
- The pre-check lists before the start which tables the switch would remove. The files are only counted by the restore itself; their number is shown in the main tile afterwards.
- If there is not enough space for the uploads and you therefore tick Replace uploads in place anyway (cannot be undone), the switch is unticked and blocked. It then has no effect for the whole restore: files in the root folder and tables that are not in the backup stay as well.
The switch does not cover:
- the file wp-config.php,
- the folders and tables of the plugin itself,
- files and folders that were excluded during the backup, for example caches, folders of other backup plugins and other WordPress installations,
- tables of another WordPress installation in the same database whose table prefix begins with the prefix of this website, for example
wp_shop_next towp_, - what the restore itself leaves out, for example the files .htaccess, web.config and .user.ini, as long as you do not restore them.
The label of the switch has a dotted underline and shows a short version of this explanation as a tooltip when you point at it with the mouse or tap it. The tooltip calls the old state “folder of the previous state”.
The pre-check
The pre-check runs by itself as soon as the tile opens, and once more after every change to the scope or the switches. This way nine points are checked before the restore writes anything. Every point ends with one of four states: OK, Warning, Blocked or Not checked.
- A warning does not block the start: you assess the risk yourself.
- If a point blocks, the list is followed by The pre-check blocks the start., and Start restore stays blocked.
- If this website does not know the backup, the pre-check shows a message with Confirm backup as correct and Cancel. Start restore stays blocked until you have confirmed the backup as correct. More about this: The restore precheck: every point explained.
- If there is not enough space to build the uploads next to the live folder, the block No way back appears: Restore uploads when there is not enough space.
- If the database is part of the scope, the pre-check lists below the points the tables of this website that are not in the backup, and says whether they stay or are removed.
Every point with its findings is explained in The restore precheck: every point explained.
The confirmation dialog
Start restore opens a confirmation dialog before anything happens. The dialog window is called Start the restore?
- The text says which backup is restored and gives the time limit: the previous state is kept for 7 days.
- The line lists what is restored: database, files, WordPress core.
- You may need to log in again afterwards.
- Cancel closes the confirmation dialog. The preparation stays open.
- Start restore starts the restore.
- If one or more points of the pre-check show a warning, the confirmation dialog additionally reads … point(s) of the pre-check warn; you have judged the risk.
- If Remove everything that is not in the backup is ticked, the confirmation dialog repeats this choice in yellow.
- If you have ticked Replace uploads in place anyway (cannot be undone), the confirmation dialog repeats this choice in red.
- The button Start restore is red, in the preparation and in the confirmation dialog. It is on the right, Cancel on the left.
The restore is running
- The line shows the step with its number, the number of steps and its name, for example “Step 2 of 5: Building files”.
- The line shows the running phase and its progress: entries, size and remaining time.
- Abort restore aborts the restore.
- Cancel aborts the restore. The button is there until the switch-over begins.
Which steps a restore has depends on the scope:
| Step | What happens |
|---|---|
| Pre-check | The nine points run once more. If a point blocks, the restore ends before anything is written. |
| Building files | In every root folder the plugin creates its own folder and writes the files of the backup into it. It reads a local target in place. From an external target it fetches one part after the other into its work folder, checks it and deletes it there again. If fetching fails with an error that may be temporary, the plugin repeats the attempt after 5 and after 15 seconds; the third failure in a row ends the restore before anything is switched. If you restore only the database, the step is called Fetching parts. |
| Importing database | Only with the database. Every table of the backup is created under a provisional name next to the live tables and filled. If the database server reports an error, the plugin repeats the step after 5 and after 15 seconds. The third failure in a row ends the restore before anything is switched. |
| Switching over | The plugin counts the files in the uploads and in the root folder that are not in the backup, and switches uploads and root folder files file by file. The switch-over in the maintenance mode of WordPress follows: first all tables of the database at once, then core, must-use plugins, plugins, themes and the rest of wp-content. After that the new website confirms itself. If Remove everything that is not in the backup is ticked, the counted files move to the previous state already while they are being counted, and the tables that are not in the backup move there during the switch-over of the database. |
| Confirming | The final step. If the database is restored, one step runs in the new WordPress: the object cache is flushed, the permalinks are rewritten, the schedule of the plugin is set again. Then the plugin sets the permissions of the folders. |
- At the start, the time is replaced by calculating the remaining time …
- After a click on Cancel the tile reads Abort requested; the job stops at the next step. The restore stops at the next step, and the page reports Restore aborted; nothing was switched. If uploads or files in the root folder had already been switched, the plugin first brings them back and reports Restore aborted; the previous state is back.
- The page keeps showing the progress, even if your login becomes invalid after the switch-over of the database. If you reload the page, it finds the running restore again.
Keep the page open
The open page helps to trigger the steps of the restore. After the switch-over it confirms the new website if the server cannot call itself.
The confirmation after the switch-over
- The line shows the step “Switching over”. The button Cancel is gone: from the switch-over on, the restore can no longer be aborted. If you click Abort restore from here on, it is replaced by The job can no longer be aborted at this point. Afterwards the restore can be undone.
- The new website is confirming itself; this page helps if the server cannot call itself.
After the switch-over the new website has to confirm itself. For this the plugin calls its own address. It only gets an answer if WordPress, the plugins and the theme of the new state load. The open Restore page calls the same address, for servers that block requests to themselves.
- If the confirmation does not come within 60 seconds, the same step switches everything back. The website then runs on the previous state again within seconds, and the restore ends as failed.
- After the confirmation the plugin fetches the home page once. If it reports a fatal error, that is noted as a warning in the log. The restore stays in place; the decision is yours.
The result
The result appears as a message below the main tile.
| Message | Meaning |
|---|---|
|
green Restore applied · You may need to log in again afterwards. |
The restore is applied. The message closes by itself after 8 seconds; the main tile shows the open rollback. |
|
yellow Restore applied · You may need to log in again afterwards. |
The restore is applied with warnings. The message stays until you close it. The warnings are in the log of the restore: in the Extended view in the tile Recent restores. |
|
yellow Restore aborted; nothing was switched. |
You aborted the restore before the switch-over. The website is unchanged. |
|
yellow Restore aborted; the previous state is back. |
Uploads or files in the root folder had already been switched; the plugin has brought them back. |
|
red Restore aborted; the previous state could not be put back completely. See the log. |
Not everything could be brought back. Log after it opens the log of the restore. |
|
red Restore failed: … |
The message gives the reason. Log after it opens the log of the restore. If the server already rejects the start, the message is followed by Show global log; the link opens the global log. |
The red message can give these reasons:
| Reason | What it means |
|---|---|
| The pre-check blocked the start. | A point of the pre-check blocked in the first step. Nothing was written. Open the preparation once more and read the pre-check. |
| The backup has damaged entries; nothing was switched. | The log gives the number of damaged entries and lists the first five. Use another backup, or choose Leave out damaged entries (otherwise a damaged entry stops the restore) in the Extended view. |
| The new website did not confirm itself in time; the previous state is back. | The new state could not be loaded, or the confirmation did not arrive. The website runs on the previous state. |
| The switch-over failed; the previous state is back. | The plugin reverted the switch-over. The website runs on the previous state. |
| Switching the database tables failed; nothing was switched. | The database server did not carry out the renaming of the tables. If other connections keep the tables busy, the plugin tries again after 5 and after 15 seconds; only the third failure ends the restore. The log contains the error of the database server. |
| Importing the database failed three times; nothing was switched. | A step of the import failed three times in a row with an error of the database server, for example because the connection broke off. The provisional tables are removed again. |
| A part failed verification twice. | For the restore this means: a part that was fetched from the target does not match its checksum. Nothing was switched. Check the backup: Check a backup. |
| Nothing to restore. | None of the chosen roots is left to be restored. Check the scope and the switches. |
| A job is already running. | The server rejected the start: only one job runs at a time. Wait until it has finished, then start the restore again. |
| Entries of the backup could not be created in the build folders; nothing was switched. See the log. | No space, no permission, or a name that the file system already treats as taken. Fix the cause, or choose Leave out entries that cannot be created (otherwise such an entry stops the restore) in the Extended view. |
| An error occurred after the switch-over; the previous state is back. | The plugin reverted the switch-over. The website runs on the previous state. |
| No web server process took over the switch-over; the restore was reverted before anything was switched. Check the self-request in the settings or run the restore from the browser. See the log. | The command line hands the switch-over to the web server through the self-request. No process of the web server took it over within a minute. |
| The database could not be put back after the failed restore; the restored state stays and the way back stays open. Run undo again later. | The rollback stays open. Choose Undo restore again later. |
If the page has no text of its own for a reason, it reads Cause: … with an English code; the details are in the log. If reading from the target fails, the message additionally names the target and the unchanged message from the target. A failed and an undone restore send an email like a failed backup if On errors and warnings is switched on in the notifications.
The open rollback
- The line says when the restore was applied and until when it can be undone.
- The previous tables and folders are kept for 7 days. Delete the way back or undo the restore; after 7 days the way back is deleted automatically.
- The line shows the result of the comparison of the file wp-config.php, here The backup has no wp-config.php to compare with. A backup never contains the file.
- Delete the way back asks in the dialog window Delete the way back? and then removes the previous state: the previous tables and folders. After that there is no longer a rollback.
- Undo restore brings the previous state back.
If the restore removed something because it was not in the backup, the main tile shows that as well. This is explained in the section “What the main tile shows after the restore” further down.
Both buttons start immediately, without a confirmation prompt. The work runs as a job; the main tile shows the progress, and both buttons are blocked meanwhile.
| Message | Meaning |
|---|---|
|
green Restore kept. The previous tables and folders were removed. |
The rollback is closed. The main tile is ready again. |
|
green Restore undone. The website runs on the previous state again. |
The previous state is back. The main tile is ready again. |
|
yellow Restore undone, but … step(s) could not be put back. See the log. |
Not every step could be undone. Log after it opens the log of the operation. |
|
red That did not work: … |
The message gives the reason, for example The database could not be put back; nothing was closed and the way back stays open. Run undo again later., The previous tables could not be removed; the way back stays open and keep runs again later. or This restore is being kept; the previous tables are already removed, so undo is no longer possible. Keep runs to the end. |
- If there were warnings while keeping or undoing, the same sentence is shown in a yellow message with the link Log.
- Both buttons also work after logging in again, as long as the rollback is open.
- After 7 days the plugin deletes the rollback on its own.
- The previous state also includes what the restore removed with Remove everything that is not in the backup: Undo restore brings it back. Delete the way back deletes it permanently, and so does the automatic deletion of the rollback after 7 days.
- Uploads that were replaced in place have no rollback. Undo restore then brings back everything else; the uploads stay as the restore wrote them.
- The Overview page shows the open rollback as well, with the link Keep or undo it.
- As long as the rollback is open, the plugin cannot be deactivated.
- If the uninstall switch on the Settings page is switched on, the main tile also shows in red A restore still has an open way back. Decide with Keep or Undo before deleting the plugin: with this switch on, the previous state (old tables and folders) would stay behind and nothing could keep, undo or even find it any more.
- Undoing leaves the plans, exclusions and settings of the plugin as they are at that moment.
Step by step: Keep or undo a restore.
What the main tile shows after the restore
As long as the rollback is open, the main tile shows results of the restore below the note about the 7 days: what the restore removed because it was not in the backup, what stayed in place, and the comparison of the file wp-config.php with the backup. The picture shows the main tile after a restore with Remove everything that is not in the backup.
- Removed because not in the backup; “Undo restore” brings them back: It is followed by the number of removed files per root and the number of removed tables.
- Delete the way back deletes the previous state permanently, including what was removed.
- Undo restore brings the previous state back, including what was removed.
The line Removed because not in the backup; “Undo restore” brings them back: is shown only if the restore removed something with Remove everything that is not in the backup. The numbers follow: per root …: … files and for the database … tables. These files and tables are in the previous state.
Further lines can follow below:
- …: … excluded entries inside swapped folders stayed in place (never in a backup) is shown in grey.
- …: … of them also exist in the backup; the live version was kept is shown in yellow.
- …: … excluded entries could not be copied; they come back only with undo is shown in yellow.
- …: … files could not be moved to the previous state and stay is shown in yellow.
A restore never puts back the file wp-config.php, and a backup never contains it. Below the results you therefore see The backup has no wp-config.php to compare with. Once you have kept or undone the restore, the page no longer shows what was removed or this line.
Import from file
Import from file opens a tile with an upload area, the button Choose file, the dropdown menu Import to target and the button Import. You choose the backup file (.tar) that this plugin downloaded and the target where the backup is to be stored.
The upload runs in parts. Afterwards the plugin checks the backup, stores it at the chosen target and adds it to the list. From there you restore it like any other backup. Step by step: Import a backup from a file.
The Extended view
The Extended view adds:
- the column Plan in the list of backups,
- the roots and the switches in the tile Prepare restore,
- the tile Recent restores below the list.
- The column shows what ran: Backup of … for the restore of this backup, otherwise Way back deleted or Undo restore.
- The column shows the state, for example Undo open, kept, deleted or reverted.
- Duration shows how long the job ran.
- The arrow expands and collapses the tile. A click on the title row does the same.
- The dot shows the result: green for success, yellow for with warnings, red for failed or aborted.
- Log … opens the log of this job.
| State | Meaning |
|---|---|
| Running | The job is still running. |
| confirmed | The restore is applied. The word is shown if nothing is noted about the rollback. |
| Undo open | The restore is applied, the previous state is still there. |
| kept | The restore was kept, the previous state is removed. |
| deleted | Appears in the row Way back deleted: the previous state has been removed. |
| reverted | The restore was undone. The same word is shown for a restore that failed and whose switch-over the plugin reverted. |
| Failed | The job failed. |
| Aborted | The job was aborted. |
For a running and for an aborted restore, the column before it reads Undo restore instead of the backup.
The tile is collapsed when you open the page. When expanded, it shows 7 rows, the newest first. Show more adds 7 more each time, Show all adds all of them, up to a maximum of 100; Show less goes back to the first 7. As long as no restore has ever run, it reads No restores yet.
The log
Log in the menu of a backup, in the tile Recent restores and after a red message opens the same dialog window. It shows the last 500 lines of the log, with time, level and message per line. Logs are in English. More on this: Progress, messages and log.
See also
- Restore the website from a backup
- The restore precheck: every point explained
- Restore only parts
- Restore a backup on another website
- Restore and import with WP-CLI
On the command line
WP-CLI not set up yet? How to install WP-CLI.
Pre-check, restore, keeping, undoing and import also work with WP-CLI. You refer to a backup by its job name; backup list shows the job names. The command hands the switch-over itself over to the web server, because the new website confirms itself there.
# Show the backups with their job names wp cloneworx-backup backup list # Run the pre-check for a backup wp cloneworx-backup restore precheck <Job> # Restore the whole backup wp cloneworx-backup restore run <Job> # Restore only the database wp cloneworx-backup restore run <Job> --roots=db # Whole backup; remove what is not in the backup wp cloneworx-backup restore run <Job> --remove-extras # Show the running restore or the pending rollback wp cloneworx-backup restore status # Keep the restore: the previous state is removed wp cloneworx-backup restore keep # Undo the restore: the previous state comes back wp cloneworx-backup restore undo # Import a backup from a file to a target wp cloneworx-backup import /tmp/backup.tar --target=local-1