Backup, rollback and recovery in the Update Manager

How to make a manual backup, put back the previous code version or database schema, restore the whole system from a backup, and what the recovery key is for.

If something goes wrong after an update, the Update Manager helps on several levels: you can put back the previous code, revert the update's database changes, or return the whole system to the state of an earlier backup. If the interface itself does not start, the independent recovery tool helps.

Manual backup and restore

  1. Open System → Update Manager.
  2. For a manual backup click Create a backup now. The backup is made and verified the same way as before an update and appears on the Backups tab.
  3. To put back only the code, click Roll back code on the Rollback and recovery tab and confirm: "Put back the previous code version? The database is not changed."
  4. If the update's database changes must also be reverted, click Roll back database schema in the update log row after rolling back the code.
  5. For a full restore click the Full restore icon (clock with backward arrow) in the backup's row on the Backups tab.
  6. Type the word RESTORE and the backup's version number exactly into the confirmation field, for example "RESTORE 1.4.2", then start.

Points to note

A full restore returns the database and the code to the state of the backup. Everything written after the backup is lost. Only a verified backup can be restored, and the interface stays in maintenance mode for up to one hour.
  • The code can only be rolled back if the update allows it and the previous code still exists.
  • The database schema can only be reverted if every migration of the update is reversible and the code has already been rolled back. If the change is not reversible, use the full restore.
  • No rollback can be started while an update is running.

Recovery key

  1. On the Rollback and recovery tab click Generate recovery key and confirm. The previous key stops working.
  2. Copy the key and keep it safe: it is shown only once.
  3. If the interface does not start, use the independent recovery tool from SSH (recommended). For web use, first click Enable web recovery for 1 hour; the web address only works for that time.

Deleting all data

The Update Manager has a button that deletes all of the system's data. Only the super administrator can use it, the text requested on the button must be typed exactly into the confirmation field, and a verified backup from the last 7 days is required; otherwise: "A verified backup from the last 7 days is required first."

Example

After an update one of Sample Ltd.'s reports gives a wrong result. The administrator puts back the previous code with Roll back code; the database is unchanged, so the invoices recorded since the morning remain. After the vendor's fix they update again.

Related topics: backup software update