Skip to content

Miner backup restore

Larry edited this page Sep 16, 2021 · 1 revision

Epik Miner backup and restore

Backup

This process backs-up metadata of the Epik miner, which is needed to restore the operation.

  • Create a directory for this backup:

     mkdir -p ~/epik-backups/`date +%F`
    
  • Check your wallet list

     epik wallet list -i
    
  • Backup the miner's private key

     epik wallet export <miner_address> > ~/epik-backups/`date +%F`/<miner_id>_wallet.key
    
  • Call backup to backup your miner and supply the destination for the backup.cbor file:

     epik-miner backup ~/epik-backups/`date +%F`/backup.cbor
    

    Add the --offline backup if your miner is not currently running:

     epik-miner backup --offline ~/epik-backups/`date +%F`/backup.cbor
     
    
  • Backup files miner needs

     cp -r ~/.epikminer/cache ~/.epikminer/config.toml ~/.epikminer/storage.json ~/.epikminer/sectorstore.json ~/epik-backups/`date +%F`
     
    

    As the sector size of epik is 8MiB, the generated sector file is not large, so sealed will be backed up

     cp -r ~/.epikminer/sealed ~/epik-backups/`date +%F`
     
    

The file is then packaged and transferred to the target machine.

Restore

Make sure that you have initialized the Epik environment and that the nodes are running before you restore; it is best to wait for the chain synchronization to complete before performing the restore operation.

  • Import the miner private key

     epik wallet import ~/epik-backups/`date +%F`/<miner_id>_wallet.key
    
  • Copy your files to the miner if it is on another computer.

  • Call restore to restore your miner from a backup file:

     epik-miner init restore ~/epik-backups/`date +%F`/backup.cbor
    
  • Copy the miner backup configuration files

     cp -r ~/epik-backups/`date +%F`/cache ~/epik-backups/`date +%F`/config.toml ~/epik-backups/`date +%F`/storage.json ~/epik-backups/`date +%F`/sectorstore.json ~/.epikminer
     
    

    Copy the sector file directory over

     cp -r ~/epik-backups/`date +%F`/sealed ~/.epikminer/
     
    
  • Start Miner

     epik-miner run
    
  • Viewing Miner information

     epik-miner info
     epik-miner proving deadlines
    
Clone this wiki locally