[HOW TO] Migrate from Snap to Manual installed RocketChat


#1

On your Ubuntu with RocketChat installed via Snap:

sudo service snap.rocketchat-server.rocketchat-server stop

  • Make sure your mongo is still running

sudo service snap.rocketchat-server.rocketchat-mongo status | grep Active
Active: active (running) (…)

  • Make backup of your RC database

sudo snap run rocketchat-server.backupdb

  • Your should receive:

[+] A backup of your data can be found at /var/snap/rocketchat-server/common/backups/rocketchat_backup_XXXX.tgz

  • Go to folder with backup and send it to your CentOS via SSH

scp backup.tgz user@CentOsIPaddress:/home/user

On CentOs with manual installed RocketChat:

  • Stop RocketChat

service rocketchat stop

  • Drop (delete) rocketchat database

mongo
show dbs
use rocketchat
db.dropDatabase()

You should receive

{ “dropped” : “rocketchat”, “ok” : 1 }

  • Untar your backup

tar zxvf backup.tgz

  • Restore backup

mongorestore --db rocketchat var/snap/rocketchat-server/XXXX/dump/parties/

  • Reboot your OS

reboot

Check your RC, it should be fine :slight_smile:


#2

Nice, should better be posted in “Community Guides”.


#3

Thanks for sharing! This is great to have!