I was going to apply the changes this afternoon. It’s easy enough for me to just make the edits.
OK, let me know if you want me to pull it, once it’s committed, to test.
pH Input updated.
Applied it and got this:
[2024-10-10 19:25:34] Copying flask_secret_key...Done.
[2024-10-10 19:25:34] Copying SSL certificates...Done.
[2024-10-10 19:25:34] Copying mycodo/functions/custom_functions...Done.
[2024-10-10 19:25:34] Copying mycodo/actions/custom_actions...Done.
[2024-10-10 19:25:34] Copying mycodo/inputs/custom_inputs...Done.
[2024-10-10 19:25:34] Copying mycodo/outputs/custom_outputs...Done.
[2024-10-10 19:25:34] Copying mycodo/widgets/custom_widgets...Done.
[2024-10-10 19:25:34] Copying mycodo/user_python_code...Done.
[2024-10-10 19:25:34] Copying mycodo/mycodo_flask/static/js/user_js...Done.
[2024-10-10 19:25:34] Copying mycodo/mycodo_flask/static/css/user_css...Done.
[2024-10-10 19:25:34] Copying mycodo/mycodo_flask/static/fonts/user_fonts...Done.
[2024-10-10 19:25:34] Copying mycodo/user_scripts...Done.
[2024-10-10 19:25:34] Moving current Mycodo install from /opt/Mycodo to /var/Mycodo-backups/Mycodo-backup-2024-10-10_19-25-14-/bin/sh: 1: /opt/Mycodo/env/bin/crudini: not found
[2024-10-10 19:25:34] 8.16.0...mv: cannot move '/opt/Mycodo' to '/var/Mycodo-backups/Mycodo-backup-2024-10-10_19-25-14-/bin/sh: 1: /opt/Mycodo/env/bin/crudini: not found'$'\n''8.16.0': No such file or directory
[2024-10-10 19:25:34] Failed: Error while trying to move old Mycodo install from /opt/Mycodo to /var/Mycodo-backups/Mycodo-backup-2024-10-10_19-25-14-/bin/sh: 1: /opt/Mycodo/env/bin/crudini: not found
[2024-10-10 19:25:34] 8.16.0.
[2024-10-10 19:25:34] /tmp/Mycodo-master/mycodo/scripts/upgrade_install.sh: line 16: /Mycodo/.upgrade: No such file or directory
[2024-10-10 19:25:34]
[2024-10-10 19:25:34]
[2024-10-10 19:25:34] #### ERROR ####
[2024-10-10 19:25:34] There was an error detected during the upgrade. Please review the log at /var/log/mycodo/mycodoupgrade.log
I can ssh into the Pi. The log is the same thing. Now Mycodo does not seem to start up on a system reboot. Server is now giving me 403 errors. Going to work on figuring out how this thing boots to see how to recover…
You can restore a backup form the command line. See sudo /opt/Mycodo/mycodo/scripts/upgrade_commands.sh
specifically:
backup-restore [backup] Restore [backup] location, which must be the full path to the backup.
Ex.: '/var/Mycodo-backups/Mycodo-backup-2018-03-11_21-19-15-5.6.4/'
The issue was a change I introduced in the config when you upgraded the first time to test the EC Input, so restore to a version before that (the backup made at the time you upgraded for the EC Input test), then once the backup is successfully installed/running, perform an upgade to master, and it should upgrade fine.
Sorry to be a PITA…
Seeing this:
tom@mycodo:~ $ sudo /opt/Mycodo/mycodo/scripts/upgrade_commands.sh backup-restore /var/Mycodo-backups/Mycodo-backup-2024-10-10_12-44-04-8.16.0/
#### Restore of backup /var/Mycodo-backups/Mycodo-backup-2024-10-10_12-44-04-8.16.0/ initiated 2024-10-11_08-39-19 ####
#### Stopping Daemon and HTTP server ####
/opt/Mycodo/mycodo/scripts/mycodo_backup_restore.sh: line 39: apachectl: command not found
#### Running initialization
#### Creating mycodo user
useradd: user 'mycodo' already exists
The user `mycodo' is already a member of `adm'.
The user `mycodo' is already a member of `dialout'.
The user `mycodo' is already a member of `i2c'.
The user `mycodo' is already a member of `kmem'.
The user `mycodo' is already a member of `video'.
gpio:x:997:tom,mycodo
The user `mycodo' is already a member of `gpio'.
#### Compiling mycodo_wrapper
#### Creating symlinks to Mycodo executables
#### Creating files and directories
#### Setting permissions
#### Setting permissions
Backing up current Mycodo from /opt/Mycodo to /var/Mycodo-backups/Mycodo-backup-2024-10-11_08-39-19-/opt/Mycodo/mycodo/scripts/mycodo_backup_restore.sh: line 30: /opt/Mycodo/env/bin/python: No such file or directory...mv: cannot move '/opt/Mycodo' to '/var/Mycodo-backups/Mycodo-backup-2024-10-11_08-39-19-/opt/Mycodo/mycodo/scripts/mycodo_backup_restore.sh: line 30: /opt/Mycodo/env/bin/python: No such file or directory': No such file or directory
Failed: Error while trying to back up current Mycodo install from /opt/Mycodo to /var/Mycodo-backups/Mycodo-backup-2024-10-11_08-39-19-/opt/Mycodo/mycodo/scripts/mycodo_backup_restore.sh: line 30: /opt/Mycodo/env/bin/python: No such file or directory.
Fri 11 Oct 2024 08:39:28 AM EDT
#### ERROR ####
There was an error detected during the restore. Please review the log at /var/log/mycodo/mycodorestore.log
mycodorestore.log is empty.
Try manually copying a backup from that backup location to /opt/Mycodo and run:
sudo /opt/Mycodo/mycodo/scripts/upgrade_post.sh
Thank you. I kept seeing this error during upgrade_post.sh:
/bin/sh: 1: /opt/Mycodo/env/bin/crudini: not found
The script failed to connect to the frontend after its 10 retries. influxd and python are both using between 10 and 20% of the CPU each still, so I am letting it go for a while.
Tailing the logs, it is running. I just can’t connect to the frontend.
If you have a crudini error, you’re not restoring an old enough backup.
Hmm.
tom@mycodo:~ $ ls /var/Mycodo-backups/
Mycodo-backup-2023-10-03_21-04-24-8.15.9
Mycodo-backup-2023-10-17_17-27-40-8.15.9
Mycodo-backup-2023-10-18_14-04-41-8.15.10
Mycodo-backup-2023-10-20_09-13-36-8.15.10
Mycodo-backup-2023-10-28_10-59-20-8.15.11
Mycodo-backup-2024-03-30_07-21-17-8.15.12
Mycodo-backup-2024-10-02_06-35-44-8.15.13
Mycodo-backup-2024-10-10_12-44-04-8.16.0
There is no file called crudini (or env for that matter) on my system, so I am not sure restoring from an older backup will help me. I did try the ones from this year so far though.
Update: I sudo pip installed crudini in hopes that it would get me past the post_install script, which it did, but I am still unable to connect to the front end (403 Forbidden).
The system is still posting mqtt messages, so I know it’s working! No startup errors in the logs except those related to me temp sensor and the two (EC, Ph) that depend on it.
You need to run the upgrade_post.sh script.
I did that every time… I was able to get it to start by finding and starting the mycodoflask service. Now it seems to be working fine.
Thank you for all the support!
Sorry, I misread your previous message. I was posting as I was walking between appointments throughout the day and couldn’t put as much attention as was needed. Installing crudini was a good alternative. Glad it’s now working