hi
I installed frappe lms with self hosting method. how can i update to latest version?
hi
I installed frappe lms with self hosting method. how can i update to latest version?
bench get-app https://github.com/frappe/lms.git --branch develop
Write This and it ask to overwrite then write y and then after this use bench build and bench migrate.
thanks. self hosting uses docker. can you write the commands step by step?
On your host machine open the container
docker exec -it <your_backend_container_name> bash
Inside the container
bench get-app https://github.com/frappe/lms.git --branch develop
If prompted, type: y
bench build
bench migrate
Back on your host, restart containers (optional but recommended)
docker compose restart
thanks. shoud i stop my docker containers before update first?
docker compose down
docker compose up -d backend
docker exec -it <your_backend_container_name> bash
bench get-app https://github.com/frappe/lms.git --branch develop
If prompted, type: y
bench build
bench migrate
exit
docker compose down
docker compose up -d
Follow this Steps
is this a true method to update?
If you installed frappe/LMS production mode using easy install script method into docker, you can follow the below steps
Steps to Update frappe LMS production Installation
Backup and Download all you data and files of the current LMS installation from LMS Desk → Tools.
Run docker compose -f -compose.yml down inside the directory where your previous installation’s compose file is generated by running easy install script previously. You can stop and remove the running containers easily if you are using Portainer or similar docker container manager application. Do not kill or directly remove the running containers suddenly.
Check your current LMS image id by running docker image list and remember the LMS image id which is tagged as stable.
To download the latest stable image run docker pull Package lms · GitHub
By using docker image list check now there are two or more images of Package lms · GitHub and only the one latest version will be tagged stable, rest should be , even you can see the previous version is now tagged which you have just identified as stable before downloading the new latest image in step 3.
Anyway, now confirm that all your LMS docker containers are stopped and removed.
Do not remove your persistent volumes which were linked with your previous LMS. if so, you may need to restore all your previous data from downloaded backup manually which may cause you a nightmare.
As soon as your docker pull is complete and all your previous containers are removed successfully. run the easy install script again. This time it will automatically consider your stable (latest) version image for your new frappe LMS containerisation.
Keep in mind if you have changed/modified anything in the easy install script file and want to retain those changes in the new installation, do not download the easy install script again by running wget https://frappe.io/easy-install.py before running the installation script, otherwise you may need to edit into that file again.
Now wait for a few minutes, search by your proxy/localhost/server-ip:port url from your browser,
If it works: verify version from Help → About in the LMS Desk.
If it shows Internal Server Error, follow the steps below.
Go to -db-1 container logs and ff there is no error you can restart all the containers once and it may work fine else check for the error present there something like [Warning] Aborted connection 262 to db: ‘_t423b44rfy531f4rt’ user: ‘_t423b44rfy531f4rt’ host: ‘172.22.0.5’ (Got an error reading communication packets) and identify the db name, as here it is _t423b44rfy531f4rt.
Go into your -db-1 container by running docker exec -it -db-1 /bin/bash and enter mysql -u root -p then enter your mariadb password.
Now run USE _a29f89e2e931f4ea;
Repair the table once by using REPAIR TABLE tabError Log
;
Then verify status using CHECK TABLE tabError Log
;
If status shows OK, then you are good to go.
Now come to the -backend-1 container logs, if you can identify your backend container is not getting connected properly. simply stop all the LMS containers and start again. Hopefully, this time there will not be any remaining issues. and you can view your site in the browser by refreshing or reloading.
Your Error is Solved?
it didi not update to 2.28.1 and it still in 2.28 version