How to update from 4.8.7 to another version like 6.2.6

Hi,

I’m trying to upgrade from 4.8.7 to another version like 6.2.6 using the command: sudo snap refresh rocketchat-server

then I get this message:
error: snap “rocketchat-server” is not available on 6.2.6/stable but is available to install on the
following tracks:

   latest/stable  snap refresh --stable rocketchat-server
   6.x/stable     snap refresh --channel=6.x rocketchat-server
   5.x/stable     snap refresh --channel=5.x rocketchat-server
   4.x/stable     snap refresh --channel=4.x rocketchat-server

   Please be mindful that different tracks may include different features. Get more information
   with 'snap info rocketchat-server'.

Did someone have this issue?
Thank you

According to the documentation, Rocketchat must be upgraded incrementally in all major releases

Note that MongoDB version 4 has been dropped in the latest release, so you’ll need to upgrade the MongoDB database at the same time

I personally had an old snap version of 4.8.7 with mongo 4.4
Had the following to do to get upgraded/updated:

  • snap refresh rocketchat-server
  • snap refresh rocketchat-server --channel=5.x/stable
  • snap refresh rocketchat-server --channel=6.x/stable

That took a little bit of time but in the end it worked,
I created a dump of the mongo db before, I suggest you to do the same just to be safe.