FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14206 questions

16856 answers

27735 comments

54317 members

0 votes
59 views 4 comments
by
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
Hello,

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

Regards,
Best answer
by
Thank you very much!

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

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

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
@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...