Migrate snap to docker

I’d like to migrate my version of rocketchat server from Snap to Docker.

Is there a procedure for doing this?

Thanks :wink:

RocketChat Server = v6.6.2
Snap = 2.61.2
Debian 11

Well, assuming you haven’t found one on the internet, and understanding that I only have limited experience of snap, and that there are many possible installation configurations, it’ll be the same as moving it to any other location, the basic steps are:

  1. Check for any external paths linked to the container, there shouldn’t be, but check.

  2. Backup Mongodb.

  3. Setup docker with a new compose file (you can get this from the git repo), and setup your own .env.

  4. docker compose up -d the new container with your selected .env values. Check it works. It’ll be like a new install but that’s ok.

  5. In docker mongodb and rocket are separate containers, stop the rocket one. Restore the mongodb database.

  6. If there were any external paths linked to your snap container, and you’ve correctly mapped them in your compose file, copy those into whatever paths you’re now using.

  7. Restart rocket.

And you should be good to go.

Hope that helps, its how I move rocket between docker containers, and I’ve done a few.

The mongo DB in snap and docker mongo have different names.

On snap it is called ‘parties’ IIRC

On mongo or a local DB it is ‘rocketchat’

Search for something like “snap database name” here.