Applications evolve over time. Feature enhancements, bug fixes etc. How can I upgrade a canister and still get to my old state? I read Motoko has this capability but I am not sure how IC tracks this. I would like to implement my canister in Rust. In traditional blockchains this cannot be done because the address of the contract changes and the new incarnation has no memory of its old state. Thanks in advance.
1 Like
2 Likes
There is a new feature known as canister snapshots, you can access this feature in the latest release of dfx sdk, using “dfx canister snapshot” cmd in cli.
This actually creates a snapshot of canister memory and code and stores it, after this you can upgrade your canister anytime and in case you want to roll back to previous state, just use the canister snapshot to roll back.
Read more about this feature here :