Find the mbed version which was used before a backup?

Open the package.json and look at the version. The format is <PIO major package version>.<mbed os version number>.<date in yy mm dd>. E.g. 4.50802.200120 would mean major revision 4 of this package, mbed 5.8.2, 2020 Jan 20.

Also it’s contained in a header file in source code format in mbed_version.h.

E.g.