Question #2225
closedupdate from 8.1 to 8.2
Description
It is my first update of the software so I want to make sure I am doing things correctly.
Should I first navigate to the folder (in my case it is /var/www/openaltas) then run
git pull origin main
sudo python3 install/upgrade/database_upgrade.py
sudo service apache2 restart
then update the code packages by running
cd openatlas/static
npm install
Many thanks,
Gary
Files
Updated by Bernhard Koschiček-Krombholz 9 months ago
- Category set to Administration
- Status changed from New to Assigned
- Assignee set to Bernhard Koschiček-Krombholz
For this update, no database update is needed. So you can skip python3 install/upgrade/database_upgrade.py
Preferred way for this update from 8.1.0 to 8.2.0:
cd /var/www/openaltas
git pull origin main
cd openatlas/static
npm install
sudo service apache2 restart
Apache2 restart is always at the end.
And we always recommend making a database backup before you update the software. Either in the admin
-> data
-> SQL export
or look at the manual page.
Hope this helps.
Updated by Gary Hsu 9 months ago
- File error1.jpg error1.jpg added
- File error2.jpg error2.jpg added
I ran the code to pull the origin but got the following message and the installation process was aborting
"Your Local Changes to the Following Files Would Be Overwritten by Merge"
One solution I found on the Internet is to force a pull to overwrite local changes:
git reset - hard
git pull
Is it the correct way?
Updated by Bernhard Koschiček-Krombholz 9 months ago
Git can be a little complicated.
Are you sure that you are on the main branch and not on develop?
What does git status
say?
Updated by Gary Hsu 9 months ago
it says:
On branch main
Your branch is behind /origin/main' by 237 commits, and can be fast-forwarde. (use "git pull" to update your local branch)
changes not staged for commit:
(use "git add <file>.." to update what will be committed)
(use "git restore <file>.." to discard changes in working directory)
and then it lists many modified files.
I was wondering if the system wants me to make sure if I would like to pull the files main branch to overwritten the existing files.
Updated by Bernhard Koschiček-Krombholz 9 months ago
The problem is, that git thinks that you changed all these files manually. This can be caused by several things.
I think it is safe to use
git reset - hard
git pull origin main
or
git stash
git pull origin main
Maybe backup the instance/production.py
first.
Updated by Bernhard Koschiček-Krombholz 9 months ago
- Status changed from Assigned to Closed
You're welcome.