Carrier TMS Recovery
If your TDPort Carrier TMS is unreachable, showing errors, or the database is corrupted — this guide walks you through automated catastrophic recovery. Your data is safe as long as your VPS is accessible via SSH.
Your data lives at ~/.tdport/
The TDPort Carrier TMS is designed so your database and backups live outside the application directory at ~/.tdport/data/carrier.db. Reinstalling or updating the app never touches that directory. Even a completely broken install leaves your data intact.
One-command recovery
SSH into your VPS as root (or a user with sudo access) and run:
Always inspect scripts before piping to bash. View recover.sh on Codeberg
Restoring from a backup archive
If you have a .tar.gz backup file (downloaded from the app's System Settings → Backup tab, or from a thumb drive), pass it with --restore-from:
Dry run (see what would happen)
What the script does
Phase 1 — Snapshot
Copies your current database and dumps all table data to JSON so you can inspect what was in it even if the DB is later found to be corrupt.
Phase 2 — Clear the wreckage
Stops the service and moves the broken app directory aside (kept as <app>.broken-<timestamp>). Your .env.local and database are preserved.
Phase 3 — Fresh install
Downloads the latest release tarball from Codeberg, extracts it, and restores your .env.local so all your settings carry over.
Phase 4 — Restore & migrate
Optionally restores a backup archive (.tar.gz) you supply, then runs prisma migrate deploy to bring the database schema up to date.
Phase 5 — Verify
Starts the service, polls the health endpoint for up to 60 seconds, and prints a clear RECOVERY COMPLETE or RECOVERY FAILED report.
All flags
| Flag | Description |
|---|---|
| --dry-run | Print what would happen without making any changes. |
| --restore-from <path> | Path to a .tar.gz backup archive to restore. |
| --service <name> | Systemd service name (default: tdport-carrier). |
| --data-dir <path> | Sacred data directory (default: ~/.tdport). |
If recovery fails
The broken app directory is kept at /path/to/app.broken-<timestamp> so you can inspect logs or copy files. Your ~/.tdport/ data directory is never deleted by the recovery script.
Need help? Email support@tdport.com with your journal output: journalctl -u tdport-carrier --since "1 hour ago"