Folks,
The archive compressed file created as bundle of etc/config files and saved as backup.tar.gz file.
I wonder if there is a way for us to look into this archive to find out what firmware level this backup was taken at. Say a backup taken on 18x release should not accidentally get restored to 21x release. I realize that the date of the backup can often give a clue and we may also develop some protocol around renaming the file to include release level...
It will be nice to be able to take in look inside the bundle and know for sure what firmware took this backup.
An easy workaround would be to include /etc/openwrt_version (or whatever file contains the release info) into your backup tarball through /etc/sysupgrade.conf.
I believe that file contains all the details you need.
Easy solution for getting it into the archive, but the side-effect would be for it to also remain ovet upgrades on the running system (which is not wanted and also breaks the purpose here).
There's also /etc/openwrt_version which contains more info and can be sourced easily.
But as @slh pointed out, backing up that file would make you restore it as well, overwriting the original file on your new firmware. So I'd advise to write a wrapper script, e.g.:
That would yield a file like /tmp/backup-mikrotik,rb5009-r19394+27-ee4a765090.tar.gz e.g. If you don't like the revision being in the file name, you can always grep /etc/openwrt_release and store the revision value in another file that you include in /etc/sysupgrade.conf.
Sure, but /etc/openwrt_version is way more detailed. If you stick to official stable releases, you might not need that info of course. But I myself find it to be more helpful than checking the feeds.