-
Hey, I'm using the docker-container on arm64, where before I used an old container v15.04. Also is there a way to export the mnesia db to another database as mnesia is limited to 2GB? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I can think several ways to backup your mnesia database and later restore it in another machine: A) Stop ejabberd, copy the mnesia spool files to the new location, then start the new ejabberd. B) Use the backup and restore or install commands, which work with binary files. They require ejabberd be running. C) Use the dump and load commands, which work with text files, only suitable for small servers. Require ejabberd running D) Use export_piefxis and import_piefxis, which work with XML files, this may miss information as it supports only that XEP. E) Use export2sql command, and later import in an SQL database.
Great!
No. If you used the backup, dump or export_piefxis commands, you are expected to start the new ejabberd node, and then run the corresponding command: restore/install, load, or import_piefxis
Option E) |
Beta Was this translation helpful? Give feedback.
-
Hi, I have a similar question. I'm using an ejabberd Docker container from within unit tests which create various users, MUC rooms, etc. I'm hoping to take a
No errors, but on the very next test case that runs, it appears as tho the users and MUC rooms from the previous test are still there. Is there a way to purge ejabberd of data without restarting the container between each test case? |
Beta Was this translation helpful? Give feedback.
The ejabberd function that implements the
restore
API command explicitly keeps existing content, using the keep_tables option when calling mnesia.Yes. For cases like yours, you may want to use delete_mnesia before restoring a backup.