User Tools

Site Tools


guides:farming:upgradedb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
guides:farming:upgradedb [2022/05/17 12:51] vleesbanaanguides:farming:upgradedb [2022/05/18 06:10] vleesbanaan
Line 1: Line 1:
 ===== How to Upgrade the Chia db ===== ===== How to Upgrade the Chia db =====
  
-Upgrading the Chia db from v1 to v2 The process of upgrading the Chia db CAN be a very simple process. +Upgrading the Chia db from v1 to v2 CAN be a very simple process. 
 However, the reason you are reading this guide is most probably because you want to learn how to upgrade AFTER your drive is full and you don't want to sync from scratch.  However, the reason you are reading this guide is most probably because you want to learn how to upgrade AFTER your drive is full and you don't want to sync from scratch. 
  
-We will go through two different ways: +We will go through three different ways: 
-  - download v2 from a trusted source and replace v1 +  - Upgrading the easy way 
 +  - Download v2 from a trusted source and replace v1 
   - Using an external SSD   - Using an external SSD
  
Line 11: Line 12:
 ==== Updating the easy way ==== ==== Updating the easy way ====
  
 +  * in CLI change directory to chia ''cd c:\Users\%USERNAME%\AppData\Local\chia-blockchain\a*\resources\app.asar.unpacked\daemon\''
   * run ''chia db upgrade'' in CLI.    * run ''chia db upgrade'' in CLI. 
   * Update your config.yaml under the ''full_node:'' section from ''database_path: db/blockchain_v1_CHALLENGE.sqlite'' to ''database_path: db/blockchain_v2_CHALLENGE.sqlite''   * Update your config.yaml under the ''full_node:'' section from ''database_path: db/blockchain_v1_CHALLENGE.sqlite'' to ''database_path: db/blockchain_v2_CHALLENGE.sqlite''
Line 26: Line 27:
  
   - Stop all chia processes   - Stop all chia processes
-  - go to DIRECTORY +  - go to ''C:\Users\%USERNAME%\.chia\mainnet\db'' and delete ''blockchain_v1_mainnet.sqlite'' 
-  - delete the VERSION1DB +  - download the v2 db from a source you trust and place it in the folder. Spacefarmers offers a daily snapshot [[guides/farming/downloaddb|here]] 
-  - download trusted v2 +  - in your your config.yaml, replace under the ''full_node:'' section from ''database_path: db/blockchain_v1_CHALLENGE.sqlite'' to ''database_path: db/blockchain_v2_CHALLENGE.sqlite''
-  - edit config.yaml+
  
 ==== Using an external SSD ==== ==== Using an external SSD ====
Line 38: Line 38:
   * in CLI change directory to chia ''cd c:\Users\%USERNAME%\AppData\Local\chia-blockchain\a*\resources\app.asar.unpacked\daemon\''   * in CLI change directory to chia ''cd c:\Users\%USERNAME%\AppData\Local\chia-blockchain\a*\resources\app.asar.unpacked\daemon\''
   * ''chia db upgrade''   * ''chia db upgrade''
-  * when done, ''chia start all'' and wait for it to sync+  * in your your config.yaml, replace under the ''full_node:'' section from ''database_path: db/blockchain_v1_CHALLENGE.sqlite'' to ''database_path: db/blockchain_v2_CHALLENGE.sqlite'' 
 +  * when done, ''chia start farmer -r'' and wait for it to sync
  
 === Error when TMP folder full === === Error when TMP folder full ===
Line 62: Line 63:
   * In case you already used ''chia db upgrade'', remove the blockchain_v2_mainnet.sqlite that was created in your target folder.   * In case you already used ''chia db upgrade'', remove the blockchain_v2_mainnet.sqlite that was created in your target folder.
   * ''chia db upgrade''   * ''chia db upgrade''
 +
 +after you are done, don't forget to set back your temporary folder back to your original folder!
guides/farming/upgradedb.txt · Last modified: 2022/06/21 08:09 by vleesbanaan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki