Caution! Article for developersInformation on this page is intended particularly for users with advanced technical knowledge.
Dec 1, 2022 · 2 minutes to read
Normally files stored on the gateway are not persistent between updates. This means that when gateways firmware has been updated, most files will also be wiped and be unrecoverable. This can be circumvented with use of
persist_move is utility in the gateway which can move file or folder to persistent storage which is persistent over gateway firmware updates. This is implemented by moving files/folders to persistent user partition and creating symlinks from their old location to the new. This is done by service called
gw-system-persist which runs on every boot.
Creating persistent files
You can create persistent files by creating files to
/etc/persist.user.d-folder1. These files should contain bash with
persist_move <target> where target is absolute path to the file or folder which is to be persist moved. These files support bash syntax and you can e.g. have if statements and for loops in them.
NOTE If you are creating your own persist files you should always reboot the gateway after creating new persist configs to
/etc/persist.user.d. If you do not reboot your gateway and update your gateway you will lose your files. This is caused by the service not being run and files not being copied to persistent storage before update (see image).
/etc/persist.user.dis persistent folder ↩︎
Last updated on Dec 1, 2022