Description
I have Rocket.Chat running on Ubuntu 18.04.4 LTS through Snap. I would like to move the data (but not the entire snap) to another hard drive. So far this is what I have tried:
Backup Rocket.Chat
sudo service snap.rocketchat-server.rocketchat-server stop
sudo snap run rocketchat-server.backupdb
sudo service snap.rocketchat-server.rocketchat-server start
Allow removable media
sudo snap connect rocketchat-server:removable-media
Stop Rocket.Chat and mongodb
sudo service snap.rocketchat-server.rocketchat-server stop
sudo service snap.rocketchat-server.rocketchat-mongo stop
Create directory on external drive to hold Rocket.Chat data
sudo mkdir /mnt/mountpoint/rocketchat-server-data
Move common directory from Snap directory to the external drive
sudo mv /var/snap/rocketchat-server/common /mnt/mountpoint/rocketchat-server-data/common
Replace Snap common directory with sym link to it’s new location on the external drive
sudo ln -s /mnt/mountpoint/rocketchat-server-data/common /var/snap/rocketchat-server/common
Start mongodb and Rocket.Chat
sudo service snap.rocketchat-server.rocketchat-mongo start
sudo service snap.rocketchat-server.rocketchat-server start
However, upon starting everything, RocketChat is unable to connect to mongodb:
May 07 15:28:16 hostname rocketchat-server.rocketchat-server[4281]: Was unable to connect to Mongo. Please make sure Mongo has started successfully: sudo systemctl status snap.rocketchat-server.rocketchat-mongo to view logs: sudo journalctl -u snap.rocketchat-server.rocketchat-mongo
May 07 15:28:16 hostname systemd[1]: snap.rocketchat-server.rocketchat-server.service: Main process exited, code=exited, status=1/FAILURE
May 07 15:28:16 hostname systemd[1]: snap.rocketchat-server.rocketchat-server.service: Failed with result 'exit-code'.
May 07 15:28:17 hostname systemd[1]: snap.rocketchat-server.rocketchat-server.service: Service hold-off time over, scheduling restart.
May 07 15:28:17 hostname systemd[1]: snap.rocketchat-server.rocketchat-server.service: Scheduled restart job, restart counter is at 7.
May 07 15:28:17 hostname systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-server.
May 07 15:28:17 hostname systemd[1]: Started Service for snap application rocketchat-server.rocketchat-server.
May 07 15:28:17 hostname rocketchat-server.rocketchat-server[4518]: Mongo is not available, can't start. Waiting 10 seconds and trying again
In response, I attempted changing permissions of the common
directory (only temporarily) with:
sudo chmod -R 777 /mnt/mountpoint/rocketchat-server-data/common
I then restarted everything but received the same error message. Does anyone have any ideas?
Thanks!
Server Setup Information
- Version of Rocket.Chat Server:
- Operating System: Ubuntu 18.04.4 LTS
- Deployment Method:
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
- Proxy:
- Firewalls involved: