Project

General

Profile

Actions

Question #2225

closed

update from 8.1 to 8.2

Added by Gary Hsu 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Administration
Target version:
-
Start date:
2024-03-04
Estimated time:

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

error1.jpg (296 KB) error1.jpg Gary Hsu, 2024-03-04 21:05
error2.jpg (158 KB) error2.jpg Gary Hsu, 2024-03-04 21:05
Actions #1

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

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?

Actions #3

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?

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Gary Hsu 9 months ago

Thank you so much. It works.

Actions #7

Updated by Bernhard Koschiček-Krombholz 9 months ago

  • Status changed from Assigned to Closed

You're welcome.

Actions

Also available in: Atom PDF