Start a trial
Color

Restoring yesterday's data

Go back to the data of an earlier day after a mistake such as a bulk delete, keeping today's data safe in case you need it.

For
OwnerAdministrator
Hosting
Office serverYour own hosting
Devices
Server
Business
All businesses

Checked against Pop Dispatch 0.1.0

Situation #

Someone deleted or changed many records by mistake, and you want the business as it stood on an earlier day. A restore replaces everything with that day's data, so anything entered since then is missing afterwards.

What keeps working #

  • Today's data stays in the data folder. The restore moves it into a replaced-<time> folder and deletes nothing.
  • Drivers' queued work stays on their phones and sends again once the server returns.

Steps #

  1. Decide the day. Open the backup folder and read the times in the file names. Each file is the state at that time, in UTC.
  2. Ask everyone to stop entering data. Anything entered after the backup time will be missing, so note recent calls on paper.
  3. Check the file before you use it: run dispatch-server verify-backup <file> and type the recovery key. It reports the rows and photos inside.
  4. Stop the server.
  5. Run dispatch-server restore <file> --data-dir <data folder> and type the recovery key when asked.
  6. Read the result. It names the replaced-<time> folder that holds today's data, and gives a reset-password command for each owner.
  7. Run those commands, start the server, and set up authenticator apps again.
  8. To look at the day before the mistake without committing, restore onto another computer or another data folder first. Compare, then decide.

How to confirm it worked #

  • The records you lost are back and GET /health answers ok: true.
  • The row counts reported by the restore match the file's manifest. The command stops with a message when they differ.

Afterwards #

  1. Enter the work done since the backup from your notes and from driver phones.
  2. Keep the replaced-<time> folder for a week. It holds today's database and photos, and it opens with the keys inside it.
  3. Remove it after a week of normal work to free disk space.
  4. Find how the mistake happened, and give the staff member the role that fits their work. See "Roles and permissions".