![]() Old server placed on the disk of the new server:Ĭp -a /data/backups//etc/ejabberd /etc/ejabberdĬp -a /data/backups//var/lib/ejabberd \Ġ4. Mv /var/lib/ejabberd /var/lib/ejabberd_shrekĠ3. Is valid, we have to change the hostname of the new machine a coupleĠ1. Since ejabberd/erlang/mnesia uses the hostname to check if the database Restoring ejabberd mnesia database files to a new machine, because the ![]() Thanks to Pietrzak for providing usage explanation. On the admin web, restore from /tmp/ejabberd2.backup.Using ejabberd_ctl restore /tmp/ejabberd2.backup.There are two methods to restore the database from a binary backup file: Go to your new host, where you plan to run ejabberd from now on. Copy the Converted Backup to the new HostĬopy your newly converted /tmp/ejabberd2.backup from the old host to the new host, for example copy it to /tmp/ejabberd2.backup.If everything went ok, you will have a new file /tmp/ejabberd2.backup ready to be imported on the new host. Replacing node: with node: Checking key: 'disc_only_copies' On the Erlang shell: 2> "/tmp/ejabberd.backup", "/tmp/ejabberd2.backup"). Now you are ready to convert the backup file. On the Erlang shell you have just opened, compile and load the module 'convert': 1> c("/tmp/convert.erl"). Start Erlang, you will see something like this on your console: $ erlĮrlang (BEAM) emulator version 5.4.10 On the admin web, store binary backup to /tmp/ejabberd.backupĭownload convert.erl and save it as /tmp/convert.erl. ![]() Using ejabberd_ctl backup /tmp/ejabberd.backup.You must do a binary backup of the Mnesia database. Go to your old host, where you are still running ejabberd. We will assume that the old node name is and the new one is Backup Database on the old Host If that fails with the error message aborted, then you probably need to convert the database nodename.īecause ejabberd uses Mnesia as its internal database, and because this system stores the Erlang node name into the backup files, when you want to migrate from one host to another you have to 'convert' the backups from the old node name to the new one. You can attempt the optimistic migration: copy the Mnesia files to new machine and start ejabberd. You may need to also convert ejabberd's Mnesia database from one nodename to other. If you are using ejabberd 2.1.0 or newer, you can use the tutorial included in the ejabberd Guide called "Change Computer Hostname".ĭepending in your ejabberd configuration, when you migrate ejabberd from one host to another įor further reading on Ejabberd administration, refer to the official documentation.IMPORTANT: This tutorial is only for old ejabberd 2.0.5. Login with full username with domain name, e.g. The Web Admin should be accessible on Open the URL using your favorite browser. sudo firewall-cmd -add-port=5280/tcp -permanent ![]() sudo systemctl restart ejabberd Step 4: Configure firewall and Access UIĪllow Ejabberd UI port on the firewall. Other user accounts should be added in a similar manner./ejabberdctl register testuser localhost testuserpasswordĮdit the ejabberd configuration file to give administration rights to the XMPP account you created /opt/ejabberd/conf/ejabberd.yml acl: You may need to replace localhost with your actual server hostname. ejabberdctl register myadmin localhost mystrongPassword
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |