I have self-hosted version of RocketChat 3.0.6
on Ubuntu 18.04.5 LTS
, that was installed more than 3 years ago. And want to upgrade to the latest available LTS version.
Have no idea how exactly it was installed, but it's for sure not docker/snap method (what was active option at that time?) because there's no snap/docker on that server.
Looks like all RC code is here /opt/Rocket.Chat
, some directories with rocketchat are in /var/lib/lxcfs/cgroup
but MongoDB and all the data located on different mounted storage here /mnt/vdb/mongodb/
.
Service from /lib/systemd/system/rocketchat.service
looks like this:
[Unit]
Description=The Rocket.Chat server
After=network.target remote-fs.target nss-lookup.target mongod.target mongod.service
[Service]
ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=rocketchat
Environment=NODE_ENV=production
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
Environment=MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01
Environment=ROOT_URL=https://rocketchat.myexampledomain.com/
Environment=PORT=3456
[Install]
WantedBy=multi-user.target
Versions:
So, my questions are:
Notes to mention:
/
there's not enough disk space to contain all the data i have (there's 20G total), so i definitely can't move 40G of data there. But it could be possible to create a backup copy because on mounted drive i have more than twice more space.My recommendation would be to upgrade manually. It doesn't look to be too difficult.
The official docs do still contain how to install manually, basically just downloading the project and running npm --install on it, then configuring your service file and some permissions, which in your case both are already done.
The upgrade guide says to just delete the files in the opt directory and copy in new ones.
I like to use a separate service to do a full backup of my systems so that I don't need to know how to back up individual applications. In the case of RocketChat there's a MongoDB instance behind it, but there's also potential file storage to consider. Plus you have other applications on the system. Rather than trying to remember how to back all of them up individually, a full system clone with something like Clonezilla might be a better option. That way you can easily restore the drive to the condition it was in before the upgrade. If this is a VM, your hypervisor should offer a button where you can just take a snapshot or backup and use that to recover if needed.