Restoring a deleted file, a mailbox, a whole server

John Smith Ltd's backups have been running for weeks (Backing up servers and PCs). Sooner or later someone asks to get something back. This scenario collects three cases, from the smallest to the…

Situation

John Smith Ltd’s backups have been running for weeks (Backing up servers and PCs). Sooner or later someone asks to get something back. This scenario collects three cases, from the smallest to the largest:

  1. A deleted file from the share \\atlas\administration: Jack Green deleted Budget 2026.xlsx on Thursday and notices on Friday.
  2. A mail folder emptied by mistake: Julia Brown deleted the folder «Invoices 2026» of the mailbox jbrown@johnsmith.test.
  3. A whole server: the business-software server srv-erp (192.168.10.41) has lost its disk and must be set up again on a new machine.

The fourth case, the appliance itself failing, has a scenario of its own: Replacing a failed appliance with a full restore.

Warning A restore from the console puts the data back where it was. For personal folders and shares, every entry that already exists is first renamed with the suffix .old.<date-time>; for everything else (configuration, service data, databases, mail) the contents of the backup overwrite what is there. Always tick the minimum you need, never a whole folder “to be safe”.

What you need

  • A console administrator (lwhite).
  • To know what you lost and when it was deleted, in order to choose the right restore point: one older than the deletion.
  • For cases 1 and 2: at least one completed appliance backup from before the deletion, on a connected storage (the right USB disk, the NAS switched on).
  • For case 3: the backup agent still registered for srv-erp, a storage with its archives, and a new (or wiped) machine with the system installed, the same host name srv-erp and reachable from the appliance.
  • The agreement of whoever uses the data you are about to bring back (above all for mail).

Steps

Case 1: a deleted file from the administration share

  1. Open Backup → Restore («Restore»). In «Restore date» every entry is date and time · type · host name. Choose the snapshot of Thursday evening (type «Daily»), that is, the one made before the file vanished: Friday morning’s would no longer contain it. The preselected point is the last one before today: it is not necessarily the one you need.
  2. In «What to restore» open the «Files and folders» branch, then «Shares», then the folder administration. The tree loads one branch at a time.
  3. Navigate to the file and tick only Budget 2026.xlsx, not the folder that contains it. The counter next to the button says «Selected: 1».
  4. Press «Restore». The console warns: «User home folders and shares are renamed to <name>.old.<timestamp>; everything else is overwritten.». Confirm.
  5. The page shows «Restore in progress…» and, at the end, «Restore complete.» (or «Restore failed.», with the reason).
  6. Tell Jack: the file is back in his folder.
The Restore page with the backup treeThe Restore page with the backup tree
The Restore page with the backup tree

If a file with the same name already existed in the same place (for example an empty copy recreated in the meantime), the current version has been renamed Budget 2026.xlsx.old.<date-time>: you have not lost it. Keep it or delete it.

Tip If the share’s recycle bin was on, before opening the backup look in the share’s «Recycle bin» folder (in Tools → Folders, or from Windows): a file deleted a short while ago is often still there, and it can be recovered without touching the backups. The recycle bin is however emptied when space runs short (see User tools and Shares).

For the technician The daemon runs restic restore --target / only for the ticked paths. For shares and personal folders it first renames what exists; it has no alternative destination: the console does not allow restoring into another folder for the appliance’s data (unlike the clients, case 3). If you want to look at the file without touching the original, restore it, check it, and then put the two names back in order.

Case 2: an emptied mail folder

Before starting, remember how mail restore works: the console restores the folders of a mailbox (or the whole mailbox), not single messages, and overwrites what is there.

  1. Ask Julia not to open the folder until you have finished, and to say what time it was deleted. Open Backup → Restore and choose the snapshot before that time (if the mail arrived the same day, the «Continuous» cycle does not contain it: it saves only files and shared folders; mail is in the scheduled cycles).
  2. In the tree open the «Mail» branch, then the mailbox of jbrown, and tick only the folder «Invoices 2026». Do not tick the whole mailbox: it would also restore «Inbox» and all the other folders as they were at the time of the backup.
  3. Press «Restore» and confirm. When the restore is over, the appliance reassigns the files to the mailbox and rebuilds Dovecot’s indexes.
  4. Julia reopens the mail program (or the webmail): the folder «Invoices 2026» is back, with the messages it had at the time of the backup.

What is lost and what is not: the messages that arrived in the folder after the backup were not in the snapshot. Since the restore rewrites files in the folder but is not designed to clean it, what arrived afterwards should stay; but the console does not guarantee it, and messages that Julia deliberately deleted between the backup and today may reappear. For a very busy folder, ask Julia to check the recent messages straight away.

Warning The manual could not verify in the lab what happens to messages that arrived after the backup in the same folder. Try the procedure on a test mailbox (for example a user created for the purpose) before entrusting it with anyone’s mail, and always keep a backup («Run now») made just before the restore.

A single deleted message can not be brought back from the console. Look first in the mailbox’s «Recycle bin» (Tools → Mail, see Groupware); then, if you really need to, restore the folder.

Calendars and address books. With Atlas’s groupware, calendars and address books live in the groupware database of the «Databases» branch, and the restore skips a database that already has tables (it does not merge it): you cannot put back a single deleted appointment. To restore the whole groupware you need the full restore (37).

Case 3: a whole server

srv-erp is a backup client: it saves to Atlas with the EDON agent. Its restore does not use the Restore page but Backup → Clients. The example client has host name srv-erp, the folders /etc, /home and /var/backups/erp and the «No rotation» archive on the NAS.

  1. Install the system on the new machine with the same host name srv-erp and the same address, 192.168.10.41: Atlas recognises the client by its host name.

  2. Install the agent and register it:

    sudo edon-agent init --server https://atlas.johnsmith.test

    Confirm the certificate fingerprint and enter the credentials of an administrator. A name already used by the old machine “takes the place” of the client and keeps the archive password: the archives of srv-erp remain the same. If you want the agent to write restores only into one folder, the technician can register it with the --restore-root option (see the «For the technician» box further down).

  3. In Backup → Clients select srv-erp. Check «Associated IP»: it must be the address the new machine presents itself from (192.168.10.41). If it is different, correct it and press «Save». If the machine is «Not authorized», register again.

  4. If the restore points do not appear (new certificate, disk reconnected), press «Scan»: choose the «Storage» Office NAS and press the button. The message is «Scan complete — snapshots found (N)».

  5. Press «Restore» in the detail bar: «Restore · srv-erp» opens with five steps.

    • «Storage»: Office NAS.
    • «Repository»: the client’s archive («No rotation»). If you see none: «No known repository: use “Scan”.».
    • «Snapshot»: choose the last one before the failure.
    • «Files»: browse the snapshot and tick the folders to bring back (/etc with caution: do not overwrite the new machine’s network configuration; tick /home and /var/backups/erp instead).
    • «Launch»: read the summary (storage, repository, restore point). For a cautious restore turn off «Restore to the original location» and with «Destination» choose a staging folder, /restore. Press «Start restore».
  6. The command does not start instantly: the agent picks it up at its next contact and the outcome arrives in the notifications (the bell). If it is not picked up within an hour, it expires.

  7. When the notification arrives, you find the files in /restore on the machine. Move the folders into place, after checking that everything is in order. For the business-software database load the dump again (the erp.sql file written by the pre-hook) with the database tools: the client’s backup saves files and folders, so what you hold is the dump, not the running database.

For the technician If the agent was registered with --restore-root, it writes only there and refuses every other destination, including the «original location», with a message that says where you can write. The restore is a command that the agent picks up at its contacts. If --restore-root is set, the «Destination» must be chosen inside that folder.

Check

  • Backup → Logs: you find «Restore» (for the appliance) with your name and, for the client, the requested command and its conclusion.
  • Case 1: the file is in its folder; ask Jack to open it. Look for any *.old.* files next to it and decide what to do with them.
  • Case 2: Julia sees the folder and checks the most recent messages; do not start other restores until she confirms.
  • Case 3: the files are in /restore (or wherever you put them); the business-software service restarts with the dump loaded; the next evening the backup of srv-erp runs as before (Backup → Planned, Backup → Logs).

If something goes wrong

  • «No completed backup is available to restore from yet.». No appliance backup has succeeded, or the storage is not connected. Look at Backup → Storage (label «Disk not connected») and Backup → Logs.
  • «Backup archive unreachable». The USB disk is not inserted or the share does not answer: reconnect it and try again. If the file is on a different disk from the one connected, choose the snapshot of the other day (even and odd days are on different disks).
  • I cannot find the file. Try an earlier snapshot: perhaps the file was deleted before the backup you chose. Changing the restore point clears the selection.
  • «Could not read the backup contents.» / «Network error while reading the backup.». The branch did not load: try again.
  • «No items selected to restore.». You pressed «Restore» without ticking anything.
  • Restoring a configuration made things worse. Configuration and service data are overwritten, with no .old copy (which exists only for personal folders and shares). That is why, before restoring something important, you press «Run now» to save the current state (see Backing up servers and PCs).
  • «The domain controller coexists with the Windows one and is not restored from a backup…». In a domain where Atlas acts as an additional controller next to a Windows one, the domain folder (addc) is not restored: remove it from the selection. The reason is the risk of rolling back the update sequence number, which would silently break replication.
  • Atlas’s database is not re-imported. This is normal: you need the full restore.
  • The client machine stays «Not authorized» or with its buttons disabled. Check «Backup port closed by the local firewall» (Network → Local firewall, service «Backup»), the «Associated IP» and register again.
LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer