How should I upgrade Chia v1 DB with boot drive almost out of space?

For anyone else stumbling on this thread, or anyone who wants to do the upgrade on a system with very little spare disk space (e.g., a VPS), the Elysium Pool bootstrap can be used to switch to the v2 update as follows.

  1. Upgrade Chia to v1.3.1. Stop the Chia program.
  2. Follow the instructions on the Elysium Pool bootstrap page to download the v2 database torrent and extract it.
  3. Edit the .chia/mainnet/config/config.yaml file to change the line that says database_path: db/blockchain_v1_CHALLENGE.sqlite to database_path: db/blockchain_v2_CHALLENGE.sqlite (i.e., change v1 to v2).
  4. Start the Chia program as usual.