You almost never lose a whole account. What happens every day is a broken database, a mailbox with deleted messages, a website file overwritten. Can you bring back only that, without touching the rest, and be sure it came back the same?
| Case | Back the same? | Time |
|---|---|---|
| Database, replaced | yes | ~2 s |
| Database, to a new database | yes | ~4 s |
| Mailbox, only what is missing | yes | ~4 to 8 s |
| Deleted mailbox, recreated | yes | ~4 s |
| Files and folders | yes | ~1 s |
Method
One real email and website account on the test server, with a backup on the storage.
For each case: first a snapshot of the correct state, then a deliberate “accident”, then the restore, once from the command line and once from the panel, with the same accident, and a comparison with the snapshot.
Database (28 thousand rows, 3 tables): half the orders deleted, one table dropped and a stray table created; replaced with the backup, with a safety copy of the broken state kept first, and checked table by table (checksum). Also restored to a new database, next to the original, without touching it.
Mailbox (815 messages): 100 messages deleted, the sent folder deleted and 5 messages with flags changed; only what was missing was brought back, message by message, keeping the 5 current flags and duplicating nothing. Then the mailbox was deleted in the panel and recreated with everything, with the same quota and password as before.
Files (calendars and a website): a folder deleted, one file changed and another deleted; what was missing was brought back and then replaced with the backup version, checked file by file (hash), with the same owner and permissions, and the changed file kept first.
Before restoring, the admin sees what is in each backup of the account (mailboxes, databases and folders), read straight from the storage.
Afterwards, the admin sees table by table (rows before and after), folder by folder (messages in the backup, before, copied and after), file by file (copied, replaced and unchanged) and where the safety copy of anything replaced was kept.
What we decided
Folder names matter: the first version of the “separate folder” in a mailbox created the folder, but webmail didn’t show it; Salvo now asks the mail server how it names folders. And an empty folder is noise: empty folders from the backup are no longer created in the separate folder.