# Restoring a Validator Node database from a snapshot

**URL:** <https://radixtalk.com/t/restoring-a-validator-node-database-from-a-snapshot/1546>\
**Category:** Validators\
**Tags:** howto, validators\
**Created:** [23 June 2022 21:53 UTC](https://radixtalk.com/t/restoring-a-validator-node-database-from-a-snapshot/1546 "2022-06-23T21:53:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mleekko](https://radixtalk.com/user_avatar/radixtalk.com/mleekko/32/17_2.png) [@Mleekko](https://radixtalk.com/u/Mleekko)\
**Post date:** [23 June 2022 21:53 UTC](https://radixtalk.com/t/restoring-a-validator-node-database-from-a-snapshot/1546/1 "2022-06-23T21:53:52Z")

</div>

### Restoring from a snapshot for Validators

This is an excerpt of the [Ledger Snapshots](https://github.com/Radix-Live/Guides/tree/main/LedgerSnapshots) guide  
that briefly describes the commands you need to execute to quickly restore the database of the Validator Node.  
Please refer to the original guide for detailed explanations.

##### 1. Prepare

```shell
apt install zstd

```

##### 2. Stop the node

```shell
# if you are running via Docker
radixnode docker stop -f radix-fullnode-compose.yml

# if you are running via systemd
sudo systemctl stop radixdlt-node

```

##### 3. Download the latest snapshot

> **3a. From CDN**
>
> 1. Browse the [Latest Snapshots on CDN](https://snapshots.radix.live/Validators-Latest/).  
> Usually the latest backup would have the today’s date (they are uploaded daily at ~00:15 UTC).
> 2. Set the date to a variable, for example:
> 
> ```shell
> DIR=2022-06-15
> 
> ```
> 
> 3. Download with curl or wget:
> 
> ```shell
> curl -O https://radix-snapshots.b-cdn.net/$DIR/RADIXDB-no-api.tar.zst
> 
> ```
> 
> This should give you the fastest download speed. For some weird reason, in some locations, this is very, very slow.  
> If you see that the download speed is less than 25MB/sec - try cancelling the download and using option `b`.

> **3b. From a server in Germany**
>
> 1. Set connection details to a variable
> 
> ```shell
> SSH_HOST=u306644-sub1@u306644.your-storagebox.de
> 
> ```
> 
> 2. Get the latest available backup and write it into a variable
> 
> ```shell
> DIR=$(echo "ls -1 ????-??-??" | sftp $SSH_HOST | grep -v "sftp> " | sed 's/.$//' | tail -n 1)
> 
> ```
> 
> You might need to confirm adding the server to known hosts.  
> When prompted for a password, enter: `S4yNVUFpRfWABrgP`.
> 3. Make sure that it was set properly: `echo $DIR`.
> 4. Download the snapshot
> 
> ```shell
> scp -P 23 $SSH_HOST:$DIR/RADIXDB-no-api.tar.zst ./
> 
> ```
> 
> You might need to confirm adding to known hosts again and enter the same password one more time.

##### 4. Unpack

Here `/RADIXDB` is the directory where Node’s ledger DB resides. Change it if needed.

```shell
rm -rf /RADIXDB/*
tar --use-compress-program=zstdmt -xvf RADIXDB-no-api.tar.zst -C /RADIXDB/

```

##### 5. Update permissions and start the node

```shell
# if you are running via Docker
sudo chown -R systemd-coredump:systemd-coredump /RADIXDB
radixnode docker start -f radix-fullnode-compose.yml -t radix://rn1qthu8yn06k75dnwpkysyl8smtwn0v4xy29auzjlcrw7vgduxvnwnst6derj@54.216.99.177

# if you are running via systems
sudo chown -R radixdlt:radixdlt /RADIXDB
sudo systemctl start radixdlt-node

```

---

<div class="post-metadata">

**Author:** ![koma](https://radixtalk.com/user_avatar/radixtalk.com/koma/32/1641_2.png) [@koma](https://radixtalk.com/u/koma)\
**Post date:** [13 February 2025 15:21 UTC](https://radixtalk.com/t/restoring-a-validator-node-database-from-a-snapshot/1546/2 "2025-02-13T15:21:07Z")

</div>

as i am really lazy i made this script for us frens (only systemd but feel free to adapt for docker):

> <https://github.com/koma-xrd/snyc_radix_snapshot/blob/main/sync_radix_snapshot>
