-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add backup and restore guide #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| # Backup and Restore Guide | ||
|
|
||
| This guide explains how to backup and restore your Shutter API DAppNode package data. | ||
|
|
||
| ## Backup Creation | ||
|
|
||
| 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. | ||
|
|
||
| ### What Gets Backed Up | ||
|
|
||
| The package automatically backs up the following critical data: | ||
|
|
||
| - **Keyper Configuration** (`/keyper/config`): Contains your Shutter Keyper settings and configuration files | ||
| - **Chain Configuration** (`/chain/config`): Contains your Shutter Chain node configuration | ||
| - **Database Data** (`/var/lib/postgresql/data`): Contains the PostgreSQL database with your Keyper's state | ||
| - **Metrics Configuration** (`/config/user`): Contains your metrics service configuration | ||
|
|
||
| ### Creating a Backup | ||
|
|
||
| 1. Navigate to your DAppNode UI | ||
| 2. Go to the Shutter API package | ||
| 3. Click on the "Backup" option | ||
| 4. Wait for the backup process to complete | ||
| 5. Download the generated backup file to a secure location | ||
|
|
||
| ## Restore Process | ||
|
|
||
| The restore process requires a two-step approach: | ||
|
|
||
| ### Step 1: Package Installation | ||
| The DAppNode package must be installed first through the DAppNode UI. This creates a fresh installation with default configuration. | ||
|
|
||
| ### Step 2: Backup Restoration | ||
| Once installation is complete, the previously downloaded backup file can be restored to the newly installed package. This will restore all your previous data. | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| After restoration, the environment variables in the restored deployment will match those configured during the package installation of restore process. This includes: | ||
|
|
||
| - `KEYPER_NAME`: Your unique keyper identifier | ||
| - `SHUTTER_API_NODE_PRIVATEKEY`: Your Ethereum private key | ||
| - `ETHEREUM_WS`: Your Ethereum WebSocket RPC endpoint | ||
| - `SHUTTER_PUSH_METRICS_ENABLED`: Metrics push configuration | ||
| - `PUSHGATEWAY_URL`: Metrics push gateway URL | ||
| - `PUSHGATEWAY_USERNAME`: Push gateway authentication | ||
| - `PUSHGATEWAY_PASSWORD`: Push gateway authentication | ||
|
|
||
| ## ⚠️ Manual Configuration Restoration Required | ||
|
|
||
| **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: | ||
|
|
||
| - **`/metrics-config/settings.env`** will contain: | ||
| - `KEYPER_NAME` | ||
| - `PUSHGATEWAY_URL` | ||
| - `PUSHGATEWAY_USERNAME` | ||
| - `PUSHGATEWAY_PASSWORD` (if any) | ||
|
|
||
| - **`/keyper-config/keyper.toml`** will contain: | ||
| - `SHUTTER_API_NODE_PRIVATEKEY` | ||
| - `ETHEREUM_WS` | ||
| - `SHUTTER_PUSH_METRICS_ENABLED` | ||
| - `HTTPEnabled` | ||
|
|
||
| **Note**: At the moment, whether logs were enabled is not backed up. | ||
|
|
||
| ## Security Considerations | ||
|
|
||
| ⚠️ **Important Security Notes:** | ||
|
|
||
| - The backup archive contains previous configuration files that will include sensitive data | ||
| - Your private keys and configuration are stored in the backup | ||
| - Store backup files in a secure, encrypted location | ||
| - Never share backup files with untrusted parties | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| If you encounter issues during backup or restore: | ||
|
|
||
| 1. Ensure you have sufficient disk space for backup creation | ||
| 2. Verify that all services are running before creating a backup | ||
| 3. Check that the backup file was downloaded completely | ||
| 4. Ensure the package is fully installed before attempting restore | ||
| 5. Contact DAppNode support if restore fails | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a warning here that in order to add the values of the backed up installation, these should be added manually and can be found in two separate locations:
/metrics-config/settings.envwill containKEYPER_NAME,PUSHGATEWAY_URL,PUSHGATEWAY_USERNAME, andPUSHGATEWAY_PASSWORD, if any./keyper-config/keyper.tomlwill containSHUTTER_API_NODE_PRIVATEKEY,ETHEREUM_WS,SHUTTER_PUSH_METRICS_ENABLED, andHTTPEnabled.And that at the moment, whether logs were enabled is not backed up.