FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
225 views 4 comments
by anonymous
Hello

I need to store data that shall survive a device upgrade.

Is there a folder that is not wiped away?

Regards,

Martin

1 Answer

0 votes
by anonymous
Hello,

Edit /etc/sysupgrade.conf, just add the files / folders you want to preserve across an upgrade there.

Regards,
Best answer
by anonymous
Thank you very much!

How could I have found this myself? RTFM? but which M?
by anonymous

Are there restrictions on where files should or shouldn't be placed so that they can be preserved? (when adding them to  /etc/sysupgrade.conf  ) ?

I've tried many different ways, and no matter what, my files always get erased. I am clearly doing something wrong, but not sure what that could be. I have also tried adding entries to  /lib/upgrade/keep.d/xxx...  but that hasn't worked either.

by anonymous

Are there restrictions on where files should or shouldn't be placed

I don't know. I have files in /etc, /root and /opt.

by anonymous
@flebourse Ah, I figured out what I was doing wrong. I had been executing the sysupgrade command with the -c option, which I thought was necessary in order to preserve files.

But in fact, that's what was causing it to ignore the /etc/sysupgrade.conf. Once I remove that flag, everything worked as expected! The helptext for sysupgrade is sorely lacking in my opinion. Not Teltonika's fault at all- just an OpenWrt thing...