# Save/restore variables

**URL:** <https://community.homey.app/t/save-restore-variables/148454>\
**Category:** Questions & Help\
**Created:** [January 3, 2026, 1:15pm UTC](https://community.homey.app/t/save-restore-variables/148454 "2026-01-03T13:15:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricercar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ricercar/32/101928_2.png) [@ricercar](https://community.homey.app/u/ricercar)\
**Post date:** [January 3, 2026, 1:15pm UTC](https://community.homey.app/t/save-restore-variables/148454/1 "2026-01-03T13:15:53Z")

</div>

Hello,

Is there any means of backuping or saving the logical variables with their values ?  
I am trying an SHS migration and have 100+ variables to export. Any help on how to export/import them greatly appreciated

---

<div class="post-metadata">

**Author:** ![smarthomesven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/smarthomesven/32/79712_2.png) [@smarthomesven](https://community.homey.app/u/smarthomesven)\
**Post date:** [January 3, 2026, 1:31pm UTC](https://community.homey.app/t/save-restore-variables/148454/2 "2026-01-03T13:31:37Z")

</div>

In this page:

> **[Homey Developer Tools](https://tools.developer.homey.app/tools/api-playground)**

Here you can run a script:

```auto
Homey.logic.getVariables();

```

This way you can export everything. You can create a variable in the other Homey like this:

```auto
Homey.logic.createVariable({
variable: {
name: "Test variable",
type: "boolean",
value: false
}
});

```

You can import them more easily this way.

---

<div class="post-metadata">

**Author:** ![ricercar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ricercar/32/101928_2.png) [@ricercar](https://community.homey.app/u/ricercar)\
**Post date:** [January 3, 2026, 2:20pm UTC](https://community.homey.app/t/save-restore-variables/148454/3 "2026-01-03T14:20:04Z")

</div>

already tried. the import in SHS runs but nothing is created. I even rebooted everything to no avail.

edit : after failing to “update” SHS, I reinstalled the container which reverted to 12.10.0 and the creation worked.
