見出し画像

RocktChat初期化方法

RocketChatをいろいろ弄りすぎて初期化したい場合はDBそのものを削除する。まずは、rocketchatのサービスを停止する。

[root@localhost ~]# systemctl stop rocketchat

mongoサーバに接続する。

[root@localhost ~]# mongo
MongoDB shell version v5.0.18
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("44df65e7-1ebc-4d25-9434-8c6506512b8b") }
MongoDB server version: 5.0.18
================
Warning: the "mongo" shell has been superseded by "mongosh",
which delivers improved usability and compatibility.The "mongo" shell has been deprecated and will be removed in
an upcoming release.
For installation instructions, see
https://docs.mongodb.com/mongodb-shell/install/
================
---
The server generated these startup warnings when booting:
        2023-05-25T09:34:49.752-04:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted
        2023-05-25T09:34:49.752-04:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
---
rs01:PRIMARY>

show databases;でDBを確認する。

rs01:PRIMARY> show databases;
admin       0.000GB
config      0.000GB
local       0.001GB
rocketchat  0.004GB

use rocketchat;でrocketchatのDBへ接続し、databaseをDropする。

rs01:PRIMARY> use rocketchat;
rs01:PRIMARY> db.dropDatabase();
{
        "ok" : 1,
        "$clusterTime" : {
                "clusterTime" : Timestamp(1685023250, 70),
                "signature" : {
                        "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
                        "keyId" : NumberLong(0)
                }
        },
        "operationTime" : Timestamp(1685023250, 70)
}
rs01:PRIMARY> exit;

rocketchatサービスを起動する。

[root@localhost ~]# systemctl start rocketchat

メモ(テーブル一覧)

rs01:PRIMARY> show tables;
_queue
_raix_push_app_tokens
instances
meteor_accounts_loginServiceConfiguration
meteor_oauth_pendingCredentials
meteor_oauth_pendingRequestTokens
migrations
omnichannel_auto_close_on_hold_scheduler
omnichannel_queue_inactivity_monitor
omnichannel_scheduler
pbx_events
rocketchat__trash
rocketchat_analytics
rocketchat_apps_persistence
rocketchat_apps_scheduler
rocketchat_avatars
rocketchat_avatars.chunks
rocketchat_avatars.files
rocketchat_banner
rocketchat_banner_dismiss
rocketchat_credential_tokens
rocketchat_cron_history
rocketchat_custom_emoji
rocketchat_custom_sounds
rocketchat_custom_user_status
rocketchat_email_inbox
rocketchat_email_message_history
rocketchat_export_operations
rocketchat_federation_keys
rocketchat_federation_room_events
rocketchat_federation_servers
rocketchat_integration_history
rocketchat_integrations
rocketchat_livechat_agent_activity
rocketchat_livechat_business_hours
rocketchat_livechat_custom_field
rocketchat_livechat_department
rocketchat_livechat_department_agents
rocketchat_livechat_inquiry
rocketchat_livechat_priority
rocketchat_livechat_trigger
rocketchat_livechat_visitor
rocketchat_matrix_bridged_rooms
rocketchat_matrix_bridged_users
rocketchat_message
rocketchat_message_reads
rocketchat_notification_queue
rocketchat_nps
rocketchat_nps_vote
rocketchat_oauth_apps
rocketchat_oembed_cache
rocketchat_omnichannel_service_level_agreements
rocketchat_permissions
rocketchat_roles
rocketchat_room
rocketchat_server_events
rocketchat_sessions
rocketchat_settings
rocketchat_statistics
rocketchat_subscription
rocketchat_team
rocketchat_team_member
rocketchat_uploads
rocketchat_user_data_files
rocketchat_video_conference
rocketchat_webdav_accounts
users
usersSessions

この記事が気に入ったらサポートをしてみませんか?