ejabberd + Biboumi + Docker = ๐ŸŒž๐Ÿ’ฌ

admin 6bf0ddca31 copy key in acme_post_hook to preserve permissions 4 months ago
.vscode b7a2093bbd initial 2 years ago
EXTRAS e7ff561bab Added another reference 2 years ago
data 6bf0ddca31 copy key in acme_post_hook to preserve permissions 4 months ago
.env.example e08a86e094 fixed typo 2 years ago
.gitignore 8770b6a44b fixed/reworked setting hostname/ip config 2 years ago
LICENSE 3981f316eb removed (c) 2 years ago
README.db-migration.md 8aa56bd0b1 initial 2 years ago
README.md 319cb0a9b4 added missing slash in volume paths 2 years ago
RELEASE.md bddabd12f8 updated TASKS/RELEASE 2 years ago
TASKS.md fd0718a02a added turn test task 2 years ago
docker-compose.yml 6bf0ddca31 copy key in acme_post_hook to preserve permissions 4 months ago
entrypoint.sh 1adc140ecd overwrite existing custom.yml 2 years ago

README.db-migration.md

Create database

ยดยดยด cd /opt/docker/db/utils/ ./create_db.sh ejabberd ยดยดยด

Get schema and populate tables

ยดยดยด docker cp ejabberd:/home/ejabberd/database/mysql.sql . docker cp mysql.sql db:/ rm mysql.sql docker exec db sh -c 'mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD < /mysql.sql' docker exec db sh -c 'echo "SHOW TABLES;" | mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD --table' docker exec db sh -c 'rm /mysql.sql' ยดยดยด

Backup existing installation, in case something goes wrong

ยดยดยด cd /opt/docker/ejabberd docker compose down cd /opt/docker/ tar cfj ejabberd.tar.bz2 ejabberd ยดยดยด

Disable ports for the migration to avoid connections

ยดยดยด cd /opt/docker/ejabberd vi docker-compose.yml ## comment out ports ยดยดยด

Setup DB config for ejabberd

ยดยดยด vi /opt/docker/ejabberd/data/conf.custom/db.yml default_db: sql sql_type: mysql sql_server: "db" sql_database: "ejabberd" sql_username: "ejabberd" sql_password: "PutYourSecretPasswordHere" docker compose up -d ยดยดยด

Dump Mnesia database and restore in MariaDB

ยดยดยด docker exec ejabberd sh -c 'bin/ejabberdctl --no-timeout export2sql im.s-up.net /tmp/sqldump.sql' docker cp ejabberd:/tmp/sqldump.sql . docker exec ejabberd sh -c 'rm /tmp/sqldump.sql' docker cp sqldump.sql db:/ rm sqldump.sql docker exec db sh -c 'mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD < /sqldump.sql' ยดยดยด

Enable ports for the migration to avoid connections

ยดยดยด cd /opt/docker/ejabberd vi docker-compose.yml ## comment out ports

Debugging: Start a sql shell

ยดยดยด docker exec -it db sh -c 'mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD' ยดยดยด