# Canister upgrades and old state

**URL:** <https://forum.dfinity.org/t/canister-upgrades-and-old-state/43910>\
**Category:** Developers\
**Created:** [April 15, 2025, 10:28pm UTC](https://forum.dfinity.org/t/canister-upgrades-and-old-state/43910 "2025-04-15T22:28:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghostwhoowalks](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@ghostwhoowalks](https://forum.dfinity.org/u/ghostwhoowalks)\
**Post date:** [April 15, 2025, 10:28pm UTC](https://forum.dfinity.org/t/canister-upgrades-and-old-state/43910/1 "2025-04-15T22:28:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![WebTreeSoftwareSolut](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/webtreesoftwaresolut/32/40772_2.png) [@WebTreeSoftwareSolut](https://forum.dfinity.org/u/WebTreeSoftwareSolut)\
**Post date:** [April 15, 2025, 10:38pm UTC](https://forum.dfinity.org/t/canister-upgrades-and-old-state/43910/2 "2025-04-15T22:38:27Z")

</div>

> **[Stable structures | Internet Computer](https://internetcomputer.org/docs/building-apps/developer-tools/cdks/rust/stable-structures)**
>
> Stable structures are designed to use stable memory as the backing store, allowing them to grow to gigabytes in size without the need for preupgrade/postupgrade hooks.

---

<div class="post-metadata">

**Author:** ![h1teshtr1path1](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/h1teshtr1path1/32/24662_2.png) [@h1teshtr1path1](https://forum.dfinity.org/u/h1teshtr1path1)\
**Post date:** [April 16, 2025, 4:55pm UTC](https://forum.dfinity.org/t/canister-upgrades-and-old-state/43910/3 "2025-04-16T16:55:12Z")

</div>

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 :

> **[Canister snapshots | Internet Computer](https://internetcomputer.org/docs/building-apps/canister-management/snapshots)**
>
> A canister is managed and maintained by controllers. A controller can be a single developer identity, a list of developer identities, or another canister. If a canister does not have a controller, it cannot be upgraded, deleted, or otherwise...
