# DB Structure changes and Backup

**URL:** https://forum.dfinity.org/t/db-structure-changes-and-backup/14258
**Category:** Developers
**Tags:** Discussing
**Created:** [July 11, 2022, 5:57am UTC](https://forum.dfinity.org/t/db-structure-changes-and-backup/14258 "2022-07-11T05:57:38Z")
**Posts on this page:** 3
**Page:** 1

<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: [July 11, 2022, 5:57am UTC](https://forum.dfinity.org/t/db-structure-changes-and-backup/14258/1 "2022-07-11T05:57:38Z")

</div>

Here is a situation.  
Supose we have key-value container as stable memory, say Hashmap\<Int, {int, text}\>.

But later on, I want to make changes in container strucuture, say Hashmap\<int, {int, text, text}, in that case , what should i do ? Should I do manual migration of data from my previous container to this new container ? Or there is some other way also ?  
Thanks in advance.

---

<div class="post-metadata">

### Author: ![domwoe](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/domwoe/32/5165_2.png) [@domwoe](https://forum.dfinity.org/u/domwoe)
#### Post date: [July 11, 2022, 2:57pm UTC](https://forum.dfinity.org/t/db-structure-changes-and-backup/14258/2 "2022-07-11T14:57:42Z")

</div>

I’m not aware of another approach.

---

<div class="post-metadata">

### Author: ![rbolog](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/rbolog/32/239_2.png) [@rbolog](https://forum.dfinity.org/u/rbolog)
#### Post date: [July 11, 2022, 4:03pm UTC](https://forum.dfinity.org/t/db-structure-changes-and-backup/14258/3 "2022-07-11T16:03:08Z")

</div>

Maybe you can use system func preupgrade() and postupgrade() by converting during canister upgrade
