Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi Clearml, I Tried To Upgrade The Clearml Server Following This

Hi ClearML,

I tried to upgrade the clearml server following this https://clear.ml/docs/latest/docs/deploying_clearml/upgrade_server_aws_ec2_ami but it erased the data directory from /opt/clearml . I have the backup for the data but that is for mongo-3.6. I'm trying to upgrade the data from mongo-3.6 to mongo-4.4 using this https://clear.ml/docs/latest/docs/deploying_clearml/clearml_server_mongo44_migration/ but I'm facing the following problems.

I copied the dir /opt/clearml/data/mongo to /opt/clearml/data/mongo_4 and tried to launch the mongo container using
sudo docker run -id -v /opt/clearml/data/mongo_4/db:/data/db -v /opt/clearml/data/mongo_4/configdb:/data/configdb --name mongodb_upgrade mongo:4.4.9

I get an error saying the data is incompatible use version 4.2 or earlier. I cannot launch mongo containers that are version 4.0 or greater. I CAN launch mongo 3.6 with the same data dir. How can I upgrade to 4.4 if I can't even launch the mongo docker container?

  
  
Posted 2 years ago
Votes Newest

Answers 25


Thanks

  
  
Posted 2 years ago

The docker container in step 3 does not run because of the incompatibility

  
  
Posted 2 years ago

mongo 4.4 image does not launch a container if the data in mongo dir is for previous versions. We should add that comment in the documentation

  
  
Posted 2 years ago

I cannot execute step 4 because I can't get past step 3. Does that make sense?

  
  
Posted 2 years ago

Yes, I tried to run steps 1,2,3,4 in order but got stuck at 3

  
  
Posted 2 years ago

I had to manually create a dump for the mongo data and import it into 4.4. I was just referring to adding a note to the documentation for other users.

  
  
Posted 2 years ago

I hope this helps

  
  
Posted 2 years ago

There was some complication during the upgrade so I had to resort to the manual process.

I have now been able to upgrade by dumping the mongodb data and restoring it independently.

  
  
Posted 2 years ago

Steps 1 and 2 basically copy mongo 3.6 data into a new dir mongo_4 but mongo image of version 4.4 does not accept that data. So I had to perform the following steps:

Launch docker container with mongo=3.6 dump data using mongo dump Launch docker container with mongo=4.4 and empty mongo_4 data dir Restore the dump data using mongo restore
This made sure the data is now compatible with mongo 4.0 or greater

  
  
Posted 2 years ago

I was getting the error in step number 3

  
  
Posted 2 years ago

SarcasticSparrow10 why aren't you using the script to do the automatic migration? The steps you're describing are from the manual migration

  
  
Posted 2 years ago

SarcasticSparrow10 , it seems you are right. At which point in the instructions are you getting errors from which step to which?

  
  
Posted 2 years ago

But you managed to overcome it?

  
  
Posted 2 years ago

I'm getting the same error when I followed the instructions to the letter.

Here is one line from the mongo docker output
"This version of MongoDB is too recent to start up on the existing data files. Try MongoDB 4.2 or earlier."

  
  
Posted 2 years ago

The docker container in step 3 does not run because of the incompatibility

SarcasticSparrow10 , can you add the printouts regarding this?

  
  
Posted 2 years ago

👍 👏

  
  
Posted 2 years ago

Hi SarcasticSparrow10 , I am trying to understand whether we have some gaps in the instructions. In the upgrade process did you perform the steps 3-10 of the below instruction? Were there any errors when performing these steps?
https://clear.ml/docs/latest/docs/deploying_clearml/clearml_server_mongo44_migration

  
  
Posted 2 years ago

Just restore the data as it was when you backed it up, and use the automatic script

  
  
Posted 2 years ago

Steps 1 and 2 on this https://clear.ml/docs/latest/docs/deploying_clearml/clearml_server_mongo44_migration/ say to backup opt/clearml/data/mongo and uncompress into /opt/clearml/data/mongo_4 . Isn't it just copying the old data files?

  
  
Posted 2 years ago

SarcasticSparrow10 , please note that during the upgrade you do NOT copy /opt/clearml/data/mongo into /opt/clearml/data/mongo_4 , you create the folder like in the instructions: sudo mkdir /opt/clearml/data/mongo_4

This is the reason that it is giving out errors - You've got old mongo data in your mongo 4 folder...

Please follow the instructions to the letter - this should work 🙂

  
  
Posted 2 years ago

hmm, ok

  
  
Posted 2 years ago

Are you sure that it was performed fully according to the suggested sequence? The error that you posted says that v3.6 data is incompatible with v4.4 and suggests version 4.2 or earlier. Step 3 starts with mongo 4.0 that should be able to open v3.6 data. And then a number of gradual updates through versions 4.0->4.2->4.4 is performed

  
  
Posted 2 years ago

Hi AppetizingMouse58

Yes, I tried to perform steps 3-10, however step 3 raised an error because data files for mongo were incompatible between 3.6 and >4.0

  
  
Posted 2 years ago

I mean it is not possible to open v3.6 data in version 4.4. That's why the steps 3-10 are there

  
  
Posted 2 years ago

Yes

  
  
Posted 2 years ago