Community
OpenEnergyMonitor

Community

Did manual update to 9.9.9 beta emoncms no database update like earlier

emoncms
Tags: #<Tag:0x00007f10ade5a078>
(Arunesh Dutta) #1

Hello all

Like in earlier release of emoncms in 9.9.5 also I had seen update database option in admin section but after updating to latest I am not able to see same, kindly guide me with same

0 Likes

Any Easy method to update EmonCMS
(Brian Orpin) #2

How did you do the update?

The update database is the second item under users on the administration page.

0 Likes

(Paul) #3

With ref to your other thread “Any Easy method to update EmonCMS” I assume you are a non-emonpi/base/sd user and that you have updated by downloading or cloning the emoncms repo (again?).

There were some idea’s floated regards improving the update process from within emoncms, especially for non-emonpi/base/sd users like us. It seems those incomplete idea’s have materialised into the master branch of the emoncms repo.

It appears not, if you are running the master branch the new code is active and unless $admin_show_update is set OR you are an existing emonpi/base/sd user the original update database button has gone. The recent changes mean you get many or none update buttons depending on if you are running an emonpi/base/sd and have the old $allow_emonpi_admin setting or not.

As a sidenote, Aside from losing the update db button it doesn’t help non-emonpi/base/sd users much even with all the extra buttons as the $homedir/emonpi/service-runner-update.sh path is still hardcoded into emoncms without any alternative.

@aruneshdutta - It would appear what ever method you used to update, it has landed you on the master branch, not the stable branch. Your best course of action (for now at least) is to switch back to the stable branch, hopefully you can just navigate to the emoncms folder and use git checkout stable to switch, but depending on how you updated (presumably not via a git pull) you may need to pull in the changes with git pull before and/or after the switch.

To answer your original question on the other thread. The easiest way to update emoncms currently is to git pull the changes from each repo folder (ie emoncms plus any additional modules you have installed) manually or there is a script in emoncms/usefulscripts to help with this, then update the db (it should return when you switch branches) but hopefully the update process will improve in the not too distant future.

I have added a link back here, to the PR (where @borpin has already commented about the absent setting).

0 Likes

(Arunesh Dutta) #4

Thanks a lot to further put info on it I did upgrading as guided here it mentions step to pull by executing git clone https://github.com/emoncms/emoncms.git emoncms_new, kindly guide me should I rollback to other version and any information to make it operate as steadily with needed features

0 Likes

(Paul) #5

You should be able to just switch branches by running

git checkout stable

in the emoncms folder.

0 Likes

(Arunesh Dutta) #6

@pb66 I did that but it shows version 9.9.9 beta is that fine on stable or I should re check same

0 Likes

(Paul) #7

No that doesn’t sound like the git checkout stable is working, what does the output say when you issue that command?

the stable version is 9.9.8. The “beta” signifies it is the master branch, hence 9.9.9 beta is the work in progress before getting merged into stable, at which time it will become 9.9.9 (no beta).

You can post the output of the git checkout here, you could also do another git pull and post that output so we can see more of what’s going on.

Can you confirm you have changed the name of the emoncms_new folder to emoncms and renamed or deleted the original emoncms as per the guide you linked? Just to confirm that we are not perhaps working on one emoncms instance and viewing another.

0 Likes

(Arunesh Dutta) #8

@pb66 I have attached image here, it does clone but in version.txt it shows 9.9.9 beta

0 Likes

(Paul) #9
git checkout stable

It will always clone master because master is the repo’s default branch, once cloned you must switch to stable using git checkout stable.

0 Likes

(Arunesh Dutta) #10

@pb66 I already used git checkout stable

0 Likes

(Brian Orpin) #11

Were you in the /var/www/emoncms/ folder?

Can you post the output of

git status
0 Likes

(Paul) #12

. . . and what was the output? It cannot of worked if you are still on master!

0 Likes

(Arunesh Dutta) #13

img

0 Likes

(Brian Orpin) #14

@pb66 I also suspect unless the Modules are updated, there will be problems moving from the previous version.

0 Likes

(Brian Orpin) #15

@aruneshdutta, you can just select the text in the terminal window and paste it here rather than a screenshot. We need all the output.

0 Likes

(Paul) #16

No he was in emoncms_new, that’s why I asked about how far he had got with switching the repo folders (different to switching branches). I think he is viewing emoncms “a” whilst pulling and checking out emncms “B”.

0 Likes

(Paul) #17

I see what the issue is!

You have installed emoncms_new INSIDE emoncms NOT alongside emoncms as per the guide. You need to move emoncms_new up one level so it is in /var/www/html

0 Likes

(Arunesh Dutta) #18

@pb66 I was in emoncms folder I simply did pull but strange the new folder file with version.text shows 9.9.9 beta how to get over it

0 Likes

(Arunesh Dutta) #19

Also to mention I had moved emoncms_new but main thing is the cloned folder contains version.txt with 9.9.9 beta,let me know if anything wrong

0 Likes

(Brian Orpin) #20

If you go into that folder (emoncms_new), do a git checkout stable, the file will change.

However, I’d actually recommend you just update that main emoncms folder rather than do an emoncms_new folder as if you have any Modules installed, you would need to reinstall them. Those instructions you found are more relevant to upgrading from a much earlier version.

Can you do

git -C /var/www/html/emoncms status

Hightlight the output (if using PuTTY it will automatically be copied into the clipboard) and paste it into a reply please (rather than a screenshot).

NOTE you may need to update some modules. Can you paste the output from

ls -la /var/www/html/emoncms/Modules

please.

0 Likes