Unverified Commit 12a6e612 authored by Dima Stebaev's avatar Dima Stebaev Committed by GitHub

Merge pull request #178 from skalenetwork/enhancement/update-backup-documentation

update backup procedure docs
parents e0d95f3f 40cc0bba
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# SGXWallet Backup Procedure # SGXWallet Backup Procedure
When SGXWallet is initialized, the server will print the backup key. When SGXWallet is initialized, the server will write the backup key into `sgx_data/sgxwallet_backup_key.txt`.
**This key must be securely recorded and stored.** **This key must be securely recorded and stored.**
Be sure to store this key in a safe place, then go into a docker container and securely remove it with the following command: Be sure to store this key in a safe place, then go into a docker container and securely remove it with the following command:
```bash ```bash
docker exec -it <SGX_CONTAINER_NAME> bash && apt-get install secure-delete && srm -vz backup_key.txt docker exec -it <SGX_CONTAINER_NAME> bash && srm -vz ./sgx_data/sgxwallet_backup_key.txt
``` ```
Master-Slave replication is recommended to support the SGXWallet backup strategy. Below are general instructions for a basic backup and recovery process. Master-Slave replication is recommended to support the SGXWallet backup strategy. Below are general instructions for a basic backup and recovery process.
...@@ -30,24 +30,12 @@ docker-compose down ...@@ -30,24 +30,12 @@ docker-compose down
command: -s -y -d -b command: -s -y -d -b
``` ```
2. Edit the `docker-compose.yml` and add `stdin_open: true` option. For example: 2. Copy the backed up `sgx_data` directory to the recovery `sgx_data` directory.
3. Create file `sgx_data/sgxwallet_backup_key.txt` in the recovery directory and write the backup key into it.
```yaml
version: "3"
services:
sgxwallet:
image: skalenetwork/sgxwallet:latest
stdin_open: true
```
3. Copy the backed up `sgx_data` directory to the recovery `sgx_data` directory.
4. Execute: 4. Execute:
```bash ```bash
docker-compose up -d docker-compose up -d
``` ```
5. Open another terminal window and run `docker attach container_name` there. 5. Edit the `docker-compose.yml` file, remove the `-b` flag.
6. Enter the backup key when prompted.
7. Edit the `docker-compose.yml` file, remove the `-b` flag and `stdin_open: true` option.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment