Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build_*
releases.json
docker-compose-tmp.yml
.idea
84 changes: 84 additions & 0 deletions backup_and_restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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 Gnosis 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_GNOSIS_NODE_PRIVATEKEY`: Your Ethereum private key
- `BEACON_HTTP`: Your Ethereum Beacon API URL
- `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_GNOSIS_NODE_PRIVATEKEY`
- `BEACON_HTTP`
- `ETHEREUM_WS`
- `SHUTTER_PUSH_METRICS_ENABLED`

**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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
context: shutter
args:
ASSETS_VERSION: shutter-gnosis-1000-set1.3 # $NETWORK-10*$CHAIN_ID-set-$VERSION
UPSTREAM_VERSION: v1.3.10
UPSTREAM_VERSION: v1.3.12
KEYPER_CONFIG_DIR: /keyper/config
SHUTTER_CHAIN_DIR: /chain
STAKER_SCRIPTS_VERSION: v0.1.0
Expand Down