![]() |
[SOLVED] 9.0.2: Unable to restore configuration from backup created with version 9.0.2 - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [SOLVED] 9.0.2: Unable to restore configuration from backup created with version 9.0.2 (/showthread.php?tid=6621) |
9.0.2: Unable to restore configuration from backup created with version 9.0.2 - jenzd - 06-16-2024 Hi all, I think I have spotted a bug in the "Config and Prefs" restore function of Moode 9.0.2 (the part which restores the configuration from the file moodecfg.ini): When I try to restore a backup created with Moode 9.0.2 the process fails at the stage where the WLAN configuration is processed. The log file /var/log/moode_autocfg.log then reads: Code: 20240616 160923 autocfg: - Network (wlan0) Note the part with the SQL exception when the process tries to insert new values into the table CFG_SSID. Issue seems to be that this table now has 10 columns (used to be just 4 in older versions of Moode), but just 4 are provided in the INSERT statement. If I understand the code correctly this is due to line 266 of the file /var/www/inc/autocfg.php indeed providing too few columns for the table: Code: for ($i = 0; $i < $count; $i++) { while the table layout returned by moodeutl -q "pragma table_info(cfg_ssid)" would be Code: 0|id|INTEGER|0||1 It is strange, however, that restoring a backup created with Moode 8.3.9 works in 9.0.2 without any errors. May be the older format is handled by a different function? Best regards Jens RE: 9.0.2: Unable to restore configuration from backup created with version 9.0.2 - Tim Curtis - 06-17-2024 Nice catch :-) I'll fix for upcoming 9.0.3 RE: 9.0.2: Unable to restore configuration from backup created with version 9.0.2 - Tim Curtis - 06-17-2024 Looking at the commit history I see that the extra columns were added in commit https://github.com/moode-player/moode/commit/5095b571edfc2e07ef82755e13035faaae3616fa two months ago leading up to the 900 release. RE: 9.0.2: Unable to restore configuration from backup created with version 9.0.2 - Tim Curtis - 06-17-2024 @jenzd, give this a try Code: sudo wget -q https://raw.githubusercontent.com/moode-player/moode/develop/www/inc/autocfg.php -O /var/www/inc/autocfg.php RE: 9.0.2: Unable to restore configuration from backup created with version 9.0.2 - jenzd - 06-17-2024 Hi Tim, The patch works. Tested with both 9.0.2 and 8.3.9 backup files. Thank you! :-) Jens RE: 9.0.2: Unable to restore configuration from backup created with version 9.0.2 - Tim Curtis - 06-17-2024 Ok cool. |