User Chat History Logs in Rocketchat Server

Hello Everyone!!

I have been using Rocket.Chat tool for a while. I am about to deploy the tool into the production environment. Can someone please let me know how do I retrieve the user chat history logs using the terminal. I use Ubuntu 18.04 OS. Is there any command or tool to retrieve the chat history logs which is stored in the Rocket.chatserver. Any help will be beneficial.

Thanks!!

Hi!

What logs are you talking about? Also, what are you planning to do? do backup and restore?

You can probably get those information using REST API or directly accessing the Database.

Hi!!

Yeah I am about to backup the user chats which is stored in the Rocket.Chat Server. I am unable to retrieve the user chats either via the terminal or the GUI. Can you please help me out to retrieve the chat logs in Rocket Chat Server via the terminal. As you mentioned, How do I access the database? Is there any specific command to directly access the Database? I use Ubuntu 18.04 OS.

Thanks!

Well, we first need to know how you deployed and at what version you are running it right now.

Based on that, you can issue some commands, thru CLI or even use some graphical softwares to extract the information you want.

You want to dump your database, and restore it into the production environment you have.

If your deployment was done with docker (which I recommend), please check this post about how to properly dump and restore it:

Hi!

I have installed Rocket Chat in my system using the below URL

My Rocket Chat Version is 3.18.0. I kindly request you to let me know if there are any commands to retrieve the user chats stored in Rocket Chat Server via terminal. I haven’t installed Rocket Chat through docker.

Thanks!

Ok, great!

You can probably use some mongo graphical software (Like Compass | MongoDB) to do it using a graphical user interface.

or you can dump using mongodump, considering it is installed:

just issuing mongodump should be able to dump. For more options (like specifying output folder, etc), please, check the docs above.