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-15Call
backupto backup your miner and supply the destination for thebackup.cborfile:lotus-miner backup /root/lotus-backups/2020-11-15/backup.cborSuccessAdd the
--offlineoption if your miner is not currently running:lotus-miner backup --offline /root/lotus-backups/2020-11-15/backup.cborSuccessBackup your
config.tomlandstorage.jsonfiles: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.jsonfiles to the miner’s directory if it is on another computer.Call
restoreto 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: bafy2bzacea3a7kqp3du5lwhm6xlaawxbz3ae7luefmhlcewljclauit7yexuqCopy
config.tomlandstorage.jsoninto~/.lotusminerdirectory:cp lotus-backups/2020-11-15/config.toml lotus-backups/2020-11-15/storage.json .lotusminerStart your Lotus miner:
lotus-miner run
The restore is now complete.