recover
Restore a deleted account from its most recent snapshot
- Command:
/go/recover - Category: Accounts
- Required argument:
<domain> - Output: Status messages, plus the output of
snapshot - Last updated: 2026-11-19
On this page: Overview · Quick start · Syntax · Arguments · Output · Examples · Troubleshooting · Details · See also
Overview
/go/recover brings back a deleted hosting account from its latest snapshot. It:
- refuses to run if the account is still active
- runs a full restore of the newest snapshot with
snapshot - reports success if the account's
wwwfolder exists afterwards
The restore itself, including recreating the account, subdomains, mailboxes, and databases, is done by snapshot. See Restoring an account.
Quick start
/go/recover example.com
Syntax
/go/recover <domain>
| Form | Behavior |
|---|---|
/go/recover <domain> |
Restores the account from the newest snapshot in that domain's repository. |
The command cannot restore from a particular date. To choose one, use /go/snapshot <domain> restore <archive>.
Before you run
- The domain must have at least one snapshot. See
snapshotfor how and where they are stored. /var/go/etc/snapshot.confmust exist, and the repository must still exist./go/snapshot <domain> deleteremoves it.- Point the domain's DNS at this server, or expect no SSL certificate at first.
- Plan to set a new password afterwards. See Output.
Arguments
| Argument | Required | Default | Notes |
|---|---|---|---|
<domain> |
Yes | — | The deleted account's domain, written in full and in lowercase. It is not normalized. |
The command has no options.
Output
| Outcome | What you get |
|---|---|
Account is active (/home/<domain>/www exists) |
Can't recover an active account. Nothing else happens. |
| Restore succeeded | The output of snapshot, then Account <domain> has been restored. |
| Restore failed | Only the error output of snapshot, for example Archive latest does not exist. No further message. |
The command always exits with code 0, including after a failure. The success message appears only if /home/<domain>/www exists after the restore. That makes success on MinIO servers invisible, because their snapshots hold /s3/<domain> instead.
The restored account gets a new random password, because the account is recreated from its saved settings by create. The login details are in the output and are emailed to the account's email address. Set a known password with password.
Logging
Every run is appended to /var/log/go/recover.log.
Examples
# Recover a deleted account
/go/recover example.com
# Check the result
ls /home/example.com
/go/snapshot example.com list
# Follow-up: set a known password
/go/password example.com 'N3wS3cureP4ss'
# Restore a specific date instead of the latest snapshot
/go/snapshot example.com restore 2026-11-18
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Can't recover an active account. |
/home/<domain>/www exists. |
Delete the account first with delete, or restore over it with /go/snapshot <domain> restore <archive>, which overwrites files. |
Archive latest does not exist, followed by a list |
The repository has no snapshots, or can't be read. | Check with /go/snapshot <domain> list. If the repository was deleted, restore from backup with restore instead. |
File /var/go/etc/snapshot.conf not Exists. |
The snapshot configuration file is missing. |
Create it. See Configuration. |
SNAPSHOT: Domain Directory /home/restore not Exists |
No domain was given, so restore was read as the domain. |
Pass the domain. |
No has been restored message |
The restore failed, or the server uses MinIO. | Check /home/<domain> and the snapshot output above. |
| Restored files are older than expected | The command always uses the newest snapshot. | Use /go/snapshot <domain> restore <archive> with the date you want. |
| Password unknown | create generated a random one. |
Run password. |
| No SSL certificate | DNS doesn't point here, or the certificate request failed. | Fix DNS, then run ssl. |
Account hidden in the panel, and Can't recover an active account. on a second try |
The restore was interrupted after the files came back. The panel hides the account during recovery. | Run /go/snapshot <domain> restore latest directly. It overwrites files and shows the account again at the end. |
| Databases missing after restore | pv isn't installed, or the dumps failed to import. |
Install pv, then run /go/snapshot <domain> restore latest --database. |
Details
What it does
- Logs the call to
/var/log/go/recover.log. - Checks whether
/home/<domain>/wwwexists. If it does, printsCan't recover an active account.and stops. - Runs
/go/snapshot <domain> restore latest. The wordlatestis resolved by restic to the newest snapshot in the repository, whatever its date. - If
/home/<domain>/wwwexists afterwards, printsAccount <domain> has been restored.
flowchart TD
A["recover domain"] --> B{"/home/domain/www exists?"}
B -- "Yes" --> C["Can't recover an active account"]
B -- "No" --> D["snapshot domain restore latest"]
D --> E{"/home/domain/www exists?"}
E -- "Yes" --> F["Account has been restored"]
E -- "No" --> G["No message"]
What the restore brings back
A full restore by snapshot recreates the account from its saved site.conf, then restores subdomains, mailboxes, MySQL/MariaDB and PostgreSQL databases, runs ssl and fix, and shows the account in the panel again. It also re-applies the saved system password line. That step has a known issue; see the $Username row in the snapshot notes for maintainers.
Rolling back a failed domain change
domain takes a snapshot of the old domain before it starts. If the change fails and the old account is gone, /go/recover <old-domain> can bring it back. Check the new domain first, because a half-finished change may have left it behind.
Notes for maintainers
| Issue | Why it matters | Suggested fix |
|---|---|---|
| No argument check | With no domain, the arguments shift and snapshot treats restore as the domain. |
Exit with a usage message if $1 is empty. |
$Domain is unquoted and not validated |
Spaces or slashes change how snapshot reads its arguments. |
Validate against ^[a-z0-9.-]+$ and quote it. |
The only "active" test is /home/<domain>/www |
An account that is still in the panel but has no www folder can be overwritten. |
Also check the Site table. |
Always exits with 0, and prints nothing on failure |
Scripts and the panel can't tell success from failure. | Print an error and exit non-zero when the restore fails. |
Success is judged only by the www folder |
Partial restores look like success, and MinIO restores never report success. | Check snapshot's result and the database records. |
| Cannot choose a snapshot | Recovering to a known-good date needs a different command. | Accept an optional second argument and pass it to snapshot. |
TimeStamp is set but never used |
Dead code. | Remove it. |
See also
| Command | Description |
|---|---|
snapshot |
Restic-based per-domain snapshot backup and restore |
create |
Create a GoAdmio account from the command line |
delete |
Delete a GoAdmio account from the command line |
restore |
Restore a GoAdmio backup from the command line |
backup |
Create a backup for all GoAdmio accounts (local and remote) |
domain |
Change the primary domain of a hosting account |
password |
Change a GoAdmio account password from the command line |
ssl |
Install an SSL certificate for a domain in GoAdmio |