Backup and restore
It's imperative that you frequently backup your Lotus Miner. This page walks you through how to backup your Lotus Miner, and also how to restore your backup.
Backup
This process backs-up metadata of the Lotus miner, which is needed to restore the operation. This backup does not include sector data.
Create a directory for this backup:
mkdir -p ~/lotus-backups/2020-11-15
Call
backup
to backup your miner and supply the destination for thebackup.cbor
file:lotus-miner backup /root/lotus-backups/2020-11-15/backup.cbor
Success
Add the
--offline
backup if your miner is not currently running:lotus-miner backup --offline /root/lotus-backups/2020-11-15/backup.cbor
Success
Backup your
config.toml
andstorage.json
files:cp ~/.lotusminer/config.toml ~/.lotusminer/storage.json /root/lotus-backups/2020-11-15
The backup is now complete. Always follow the 3-2-1 rule when storing backups:
Keep at least three (3) copies of your data, and store two (2) backup copies on different storage media, with one (1) of them located offsite. - Nakivo, 2017
Restore
Copy your
backup.cbor
,config.toml
, andstorage.json
files to the miner if it is on another computer.Call
restore
to restore your miner from a backup file:lotus-miner init restore /root/lotus-backups/2020-11-15/backup.cbor
... 2020-11-15T17:53:41.630Z INFO main lotus-storage-miner/init_restore.go:254 Initializing libp2p identity 2020-11-15T17:53:41.631Z INFO main lotus-storage-miner/init_restore.go:266 Configuring miner actor 2020-11-15T17:53:41.643Z INFO main lotus-storage-miner/init.go:592 Waiting for message: bafy2bzacea3a7kqp3du5lwhm6xlaawxbz3ae7luefmhlcewljclauit7yexuq
Copy
config.toml
andstorage.json
into~/.lotusminer
:cp lotus-backups/2020-11-15/config.toml lotus-backups/2020-11-15/storage.json .lotusminer
Start your miner:
lotus-miner run
The restore is now complete.