|
| 1 | +# Backup and Restore Guide |
| 2 | + |
| 3 | +This guide explains how to backup and restore your Shutter API DAppNode package data. |
| 4 | + |
| 5 | +## Backup Creation |
| 6 | + |
| 7 | +DAppNode provides a built-in backup functionality through the DAppNode UI. Users can create backup archives directly from the interface, which generates a compressed tar file that should be downloaded for safekeeping. |
| 8 | + |
| 9 | +### What Gets Backed Up |
| 10 | + |
| 11 | +The package automatically backs up the following critical data: |
| 12 | + |
| 13 | +- **Keyper Configuration** (`/keyper/config`): Contains your Shutter Keyper settings and configuration files |
| 14 | +- **Chain Configuration** (`/chain/config`): Contains your Shutter Chain node configuration |
| 15 | +- **Database Data** (`/var/lib/postgresql/data`): Contains the PostgreSQL database with your Keyper's state |
| 16 | +- **Metrics Configuration** (`/config/user`): Contains your metrics service configuration |
| 17 | + |
| 18 | +### Creating a Backup |
| 19 | + |
| 20 | +1. Navigate to your DAppNode UI |
| 21 | +2. Go to the Shutter API package |
| 22 | +3. Click on the "Backup" option |
| 23 | +4. Wait for the backup process to complete |
| 24 | +5. Download the generated backup file to a secure location |
| 25 | + |
| 26 | +## Restore Process |
| 27 | + |
| 28 | +The restore process requires a two-step approach: |
| 29 | + |
| 30 | +### Step 1: Package Installation |
| 31 | +The DAppNode package must be installed first through the DAppNode UI. This creates a fresh installation with default configuration. |
| 32 | + |
| 33 | +### Step 2: Backup Restoration |
| 34 | +Once installation is complete, the previously downloaded backup file can be restored to the newly installed package. This will restore all your previous data. |
| 35 | + |
| 36 | +## Environment Variables |
| 37 | + |
| 38 | +After restoration, the environment variables in the restored deployment will match those configured during the package installation of restore process. This includes: |
| 39 | + |
| 40 | +- `KEYPER_NAME`: Your unique keyper identifier |
| 41 | +- `SHUTTER_API_NODE_PRIVATEKEY`: Your Ethereum private key |
| 42 | +- `ETHEREUM_WS`: Your Ethereum WebSocket RPC endpoint |
| 43 | +- `SHUTTER_PUSH_METRICS_ENABLED`: Metrics push configuration |
| 44 | +- `PUSHGATEWAY_URL`: Metrics push gateway URL |
| 45 | +- `PUSHGATEWAY_USERNAME`: Push gateway authentication |
| 46 | +- `PUSHGATEWAY_PASSWORD`: Push gateway authentication |
| 47 | + |
| 48 | +## ⚠️ Manual Configuration Restoration Required |
| 49 | + |
| 50 | +**Warning**: In order to add the values of the backed up installation, these should be added manually and can be found in two separate locations: |
| 51 | + |
| 52 | +- **`/metrics-config/settings.env`** will contain: |
| 53 | + - `KEYPER_NAME` |
| 54 | + - `PUSHGATEWAY_URL` |
| 55 | + - `PUSHGATEWAY_USERNAME` |
| 56 | + - `PUSHGATEWAY_PASSWORD` (if any) |
| 57 | + |
| 58 | +- **`/keyper-config/keyper.toml`** will contain: |
| 59 | + - `SHUTTER_API_NODE_PRIVATEKEY` |
| 60 | + - `ETHEREUM_WS` |
| 61 | + - `SHUTTER_PUSH_METRICS_ENABLED` |
| 62 | + - `HTTPEnabled` |
| 63 | + |
| 64 | +**Note**: At the moment, whether logs were enabled is not backed up. |
| 65 | + |
| 66 | +## Security Considerations |
| 67 | + |
| 68 | +⚠️ **Important Security Notes:** |
| 69 | + |
| 70 | +- The backup archive contains previous configuration files that will include sensitive data |
| 71 | +- Your private keys and configuration are stored in the backup |
| 72 | +- Store backup files in a secure, encrypted location |
| 73 | +- Never share backup files with untrusted parties |
| 74 | + |
| 75 | +## Troubleshooting |
| 76 | + |
| 77 | +If you encounter issues during backup or restore: |
| 78 | + |
| 79 | +1. Ensure you have sufficient disk space for backup creation |
| 80 | +2. Verify that all services are running before creating a backup |
| 81 | +3. Check that the backup file was downloaded completely |
| 82 | +4. Ensure the package is fully installed before attempting restore |
| 83 | +5. Contact DAppNode support if restore fails |
0 commit comments