Duplicate uhttpd.crt&uhttpd.key in backup archive file

openwrt version: OpenWrt 22.03.5 r20134-5f15225c1e / LuCI openwrt-22.03 branch git-23.119.80898-65ef406
device model: YouHua WR1200JS
problem: when use system>backup>Generate archive to generate a backup archive,open the archive file, and under the path /etc/ there will be two uhttpd.crt&uhttpd.key files.

I guess these are the files generated when using https.

Those are just automatically generated local SSL self-generated certificates.

There are generated automatically by the web server uhttpd start script if those files are not found.

You can safely even delete them.

But it sounds strange that there would be two identically named files in the archive file.

This must be caused by backup config duplication:

sysupgrade -l | grep -e uhttpd
grep -r -e uhttpd /lib/upgrade
2 Likes

You may be right.
I checked my own backup archive, and noticed the duplicate files already in a backup from late 2022. So, not a new issue.

1 Like

You're right, I've found the duplication files:

/lib/upgrade/keep.d/uhttpd:/etc/uhttpd.crt
/lib/upgrade/keep.d/uhttpd:/etc/uhttpd.key
/lib/upgrade/luci-add-conffiles.sh:     # save uhttpd certs
/lib/upgrade/luci-add-conffiles.sh:     [ -f "/etc/uhttpd.key" ] && echo /etc/uhttpd.key >> $filelist
/lib/upgrade/luci-add-conffiles.sh:     [ -f "/etc/uhttpd.crt" ] && echo /etc/uhttpd.crt >> $filelist

Thanks for your help!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.