Skip to content
Merged
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ The setup wizard provides options for users to configure the package. These valu
- `PUSHGATEWAY_USERNAME`: A username for the push gateway from above.
- `PUSHGATEWAY_PASSWORD`: A password for the push gateway from above.

### Backup and Restore

For information on backing up and restoring your Shutter API package data, see the [Backup and Restore Guide](backup_restore.md).

### Developer notes

Building the package requires docker and a vpn connection to a dappnode. It can be run with:
Expand Down
83 changes: 83 additions & 0 deletions backup_and_restore.md
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

Copy link
Contributor

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.env will contain KEYPER_NAME, PUSHGATEWAY_URL, PUSHGATEWAY_USERNAME, and PUSHGATEWAY_PASSWORD, if any.
  • /keyper-config/keyper.toml will contain SHUTTER_API_NODE_PRIVATEKEY, ETHEREUM_WS, SHUTTER_PUSH_METRICS_ENABLED, and HTTPEnabled.

And that at the moment, whether logs were enabled is not backed up.

## ⚠️ 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
Loading