Upgrade RocketChat 0.73 to latest Version



  • If you find yourself with an older RocketChat installation via Snap and it did not refresh automatically like I did. Then this is for you.

    When attempting to upgrade from 0.73 to 2.4.1 or 3.0 of Rocketchat it doesn't work as the MongoDB version goes from 3.2 to 3.6 or 4.0 and it does not work well with the snap and there are no Snap packages in between only version 2.x or 3.x.

    This are the steps I did.

    Backup RocketChat Database
    Stop your RocketChat Server Service

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

    Run the Backup of the Database

    sudo snap run rocketchat-server.backupdb
    

    Copy the backup created to your /home folder or another location you want

    cp /var/snap/rocketchat-server/common/backup/rocketchat_backup_<timestamp>.tar.gz /home/dbeato
    

    Remove RocketChat from Your Snap Packages

    sudo snap remove rocketchat-server
    

    Reinstall RocketChat to the latest snap package

    sudo snap install rocketchat-server
    

    Restore your Database
    Stop your Rocketchat Server Service

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

    Copy your Backup file to your Snap Common Folder

    sudo cp /home/dbeato/rocketchat_backup.tgz /var/snap/rocketchat-server/common/
    

    Restore your Database

    sudo snap run rocketchat-server.restoredb /var/snap/rocketchat-server/common/rocketchat_backup.tgz
    

    Once Restored, start your rocket chat service

    sudo service snap.rocketchat-server.rocketchat-server start