Skip to content

migrate clowns

Moritz Fuller edited this page May 26, 2023 · 19 revisions

backup production canister (power-equalizer: feature/backup-clowns)

  • backup production clowns state (npm run clown-backup)
  • backup asset order
  • deploy new canister (npm run replica && npm run deploy)
  • restore state backup to that canister (npm run restore -- --file 2023-05-26_19-11-05.json --pem "$(dfx identity export default)")
  • backup local state (npm run backup)
  • compare local backup with production backup (npm run test-clown, make sure file names in test-clown.ts are correct)

upgrade production canister (clown-skateboards: main)

  • backup clowns state (npm run clown-backup in power-equalizer: feature/backup-clowns)
  • stop canister (dfx canister --network ic stop production)
  • upgrade clowns canister (DFX_MOC_PATH="$(vessel bin)/moc" dfx deploy --network ic --argument '(principal "2v5zm-uaaaa-aaaae-qaewa-cai")' production)
  • start canister
  • backup state (npm run backup -- --network ic --chunk-size 5000)

disaster recovery (main)

  • install clean from main branch
  • recover canister from backup (set recover flag)
  • upload assets, including placeholder ( cant be parallelised to retain order)