How long should a Mango system update take?
-
This post is deleted! -
Tried restart but system didn't start.
I manually tried to restart mango from console..
ma-start appears to be running but ma.log is generating nothing.
and no http ui.
There is a new zip file in the main directory
m2m2-core-2.8.8.zip
perhaps this didn't unzip? should I manually unzip it.
This is the console ...[removed because public ip?]
The m2m2-core-2.8.8.zip file was removed and system now terminates immediately on startup.
I appears this upgrade has gone insane so I think the best approach is to download a fresh 2.8 installation and restore the last backup. :(
-
Oh no! That's unfortunate... is your Mango/lib/ folder emptied? Yeah, you can download the Core from http://store.infiniteautomation.com
Out of curiosity, what's
select count(*) from pointValues;
give? -
Yes sad, I can't do anything except restart with new core now... I suspect that I downloaded the standard core version right in the beginning and not the enterprise version as I should have because noSQL was not on the system settings menu the other day when you were advising me to tune it and with the size of our dataset noSQL will be essential.
I am reinstalling with enterprise 2.86 now. I will need to reapply the licence I am guessing.If that was the case will my backed up database restore into the enterprise version? and how much is there to switching our database over to noSQL now?
-
You can migrate your data very easily on the /mango_no_sql.shtm page, the dark stack of cylinders icon.
You'll need to update your license, as it shuts Mango down every eight hours if it isn't licensed.
H2 connection string is in the help bubble, but is
org.h2.Driver
and the other connection settings can be found in your env.properties, but you'll need to replace${ma.home}
with /path/to/Mango -
OK I will upgrade the system to 2.8.8 first and this will give me the debug log change for the history correct? Which was the one reason I wanted to upgrade in the first place so I can see history results.
I'm putting enterprise into the same opt/mango directory- reapply the licence.
- restore the database backup OR can I just drop in the database from the system I just broke?
- convert the database to noSQL
- backup
Is this the right approach?
-
No, perhaps I should have been more clear. I made the change but we didn't release it yet. I also made the history generation a little more efficient (but from what we know now, I think using SQL for the pointValues table is the problem). Also I did that in the 3.x stream.
I would personally restore your systems using a JSON backup into a new database and then migrating the data in. I see no problem using the existing database in place. I don't believe its pointValues table will be purged by the NoSQL module, so that will just linger, but to what detriment I couldn't specifically say. You could manually purge it yourself at the sql console, as well, and in time the database file may shrink.
Edit: You will probably need to email us about the license.
-
OK Phil I have enterprise v back up and the last backup database restored however curiously dashboards that were working before are not now rendering anything on the serial charts or the pie charts? Is there a licensing issue here as well? Or does noSQL require a different query format?
-
Did you do the data migration i mentioned two posts ago? Did its status report complete?
-
Yes I am almost finished. I realized the safest way was your json method and then we have a clean noSQL db. So one by one I am adding the datasources back and then syncing the es data back and then we will see if there is a speed difference as I will do those metapoint histories again. I changed some of the scripts so it will sync everything.
-
Successfully imported 60 million records into the noSQL db. :)
-
Does recalculating history cause duplicate values to be created or will it update the existing value?
-
You cannot have two values for the same point at the same time in the NoSQL system, so it updates.
-
Phil, I had everything imported into our cloud server and into noSQL (62 million timevalues and another 40 million meta points on those all in over the weekend and I was cleaning up junk files on the server when I accidentally deleted several files in the mango directory!! Oh no. I killed the process and restored the missing files and Mango kept running and all the data appeared normal but I was worried because at least one file was in the database folder but not read only and a mango restart would likely treat the db as corrupt so I did full backup. This morning I restarted and yes it gave me a new db and everything gone. So now I'm trying restore and version 2.8.8. it saved a complete backup in the backup folder but restore -> get backups does not populate the listbox with the backup files in this folder and all dir info is correct. Any ideas?
-
Hi Phillip,
Whoa. You are using the H2 restore tool ("SQL database backup" section of system settings, must press "Get backups" to populate the list)? And you have a Mango/backup/core-database-H2*.zip file? Or, do you have a Mango-Configuration-*.json file? Might want to just post the ls of your
Mango/backups
directory -
Yes I asked it to do a full backup over night and
this is it... and it is in the back folder and I click get backups but nothing shows in the listbox.. -
Hmm. Well, it looks like you have a JSON backup and a NoSQL data backup. The JSON can be imported through the emport tools, then you can use the "Restore Database" tab on the /mango_no_sql.shtm page to get the data back. You may wish to post a picture of your SQL Database backup settings. I would guess either Mango wasn't running at the time the backup was set for, or it isn't configured to do H2 backups.
-
Whoops! I appear to have overlooked something. You do need to have the point ids to be able to restore this way. What happened to your existing H2 database? If it is gone entirely, you may need to look either further back to get the data point ID to XID set from your database prior to this process, or you'll have to start over.
-
Not sure but I did change the backup type from incremental to full last night and mango was running all night with no issues. And all data was there this morning. It was lunchtime today that I restarted mango and that's when it cleared out the database. Which I half expected to be honest. (
-
No no I started with a fresh noSQL database and imported the json structure then imported 62 million data values from the two ES boxes then I ran meta data on these for another 40 million timevalues. So the old db was gone from the start.
Does mango inspect the backup file integrity before listing it because if a file or database subfolder was missing, would that not cause a faulty backup in itself?