Emergency Recovery & Disaster Survival
In extreme disaster scenarios (such as complete server failure, accidental database leaks, or deployment platform bans), NodeAuth provides you with a multi-layered asset protection umbrella. Please choose the most appropriate recovery path based on your current "survival resources."
🚑 Disaster Recovery Decision Matrix
| Available Resources | Recommended Path | Core Principle | Success Rate |
|---|---|---|---|
| PDF (Recovery Kit) + Full DB File | Path A: Perfect Environment Revival | Restore original ENCRYPTION_KEY and mount the old DB | 100% |
| Exported Backup File (.json / .csv) | Path B: Business-Level Data Import | Perform "Data Import" in a new instance and verify password | 100% |
| Encrypted Backup + Offline Script | Path C: Extreme Manual Offline Read | Use Node.js script to view plaintext JSON directly | 100% |
📄 Path A: Environment Revival (Using Recovery Kit)
Scenario: You have the original database (e.g., Cloudflare D1 or Docker data/ directory), but you cannot remember the original ENCRYPTION_KEY environment variable.
- Prepare Environment: Redeploy a new NodeAuth instance on any platform.
- Retrieve Key: Open your Recovery Kit PDF and find the saved
ENCRYPTION_KEY. - Rebuild Variables: Manually enter this Key into the environment variables of the new deployment environment.
- Connect Data: Ensure the new deployment is connected to your previous database.
- Instant Revival: Log into the new instance. Since the keys match, the system can immediately decrypt and read the original accounts in the database.
TIP
Generation & Verification: To ensure you properly save this "lifeline," the system requires you to manually enter the last 4 characters of the key after downloading the PDF during initialization. Only after successful verification is the instance officially activated.
📂 Path B: Business-Level Recovery (Using Data Import)
Scenario: You do not have the old database, but you have a habit of regular "Data Exports" or have enabled "Scheduled Cloud Backups."
- Prepare Environment: Setup a completely new NodeAuth instance with new environment variables.
- Get Files: Download the latest backup package from your USB drive, email, or Telegram/S3/Cloud Drive.
- Perform Import:
- Go to "Data Management" -> "Data Import".
- Upload your
.jsonor.csvfile. - For encrypted JSON, enter the backup password you set during backup (Note: this is usually different from the app PIN).
- Merge Success: Your 2FA assets will be imported in bulk into the new instance.
🛠️ Path C: Manual Offline Decryption (Using Script)
Scenario: Extreme survival environment, unable to set up the NodeAuth service immediately, but urgent need to view a specific account's Secret or dynamic code.
- Prerequisite: Encrypted
.jsonbackup file + Backup password + scripts/decrypt_backup.js. - Requirements: Node.js installed.
- Command:bash
node decrypt_backup.js <backup_file.json> <backup_password> - Result: Decrypted plaintext data will be displayed directly in the console and saved as a JSON file.
CAUTION
Ultimate Warning: If you lose your Recovery Kit (resulting in the loss of your ENCRYPTION_KEY) and have never exported any backup files, no one in the world (including the developers) can help you recover your data. Please print your Recovery Kit and keep it safe with your important documents.