ejabberd - Comments for "Change host name can&amp;#039;t install fallback" https://www.ejabberd.im/node/24841 en 4.5 Change Computer https://www.ejabberd.im/node/24841#comment-65442 <p>4.5 Change Computer Hostname</p> <p>ejabberd uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the Erlang node in it (see section 5.4). The name of an Erlang node includes the hostname of the computer. So, the name of the Erlang node changes if you change the name of the machine in which ejabberd runs, or when you move ejabberd to a different machine.</p> <p>You have two ways to use the old Mnesia database in an ejabberd with new node name: put the old node name in ejabberdctl.cfg, or convert the database to the new node name.</p> <p>Those example steps will backup, convert and load the Mnesia database. You need to have either the old Mnesia spool dir or a backup of Mnesia. If you already have a backup file of the old database, you can go directly to step 5. You also need to know the old node name and the new node name. If you don’t know them, look for them by executing ejabberdctl or in the ejabberd log files.</p> <p>Before starting, setup some variables:</p> <p>OLDNODE=ejabberd@oldmachine<br /> NEWNODE=ejabberd@newmachine<br /> OLDFILE=/tmp/old.backup<br /> NEWFILE=/tmp/new.backup<br /> Start ejabberd enforcing the old node name:<br /> ejabberdctl --node $OLDNODE start<br /> Generate a backup file:<br /> ejabberdctl --node $OLDNODE backup $OLDFILE<br /> Stop the old node:<br /> ejabberdctl --node $OLDNODE stop<br /> Make sure there aren’t files in the Mnesia spool dir. For example:<br /> mkdir /var/lib/ejabberd/oldfiles<br /> mv /var/lib/ejabberd/*.* /var/lib/ejabberd/oldfiles/<br /> Start ejabberd. There isn’t any need to specify the node name anymore:<br /> ejabberdctl start<br /> Convert the backup to new node name:<br /> ejabberdctl mnesia_change_nodename $OLDNODE $NEWNODE $OLDFILE $NEWFILE<br /> Install the backup file as a fallback:<br /> ejabberdctl install_fallback $NEWFILE<br /> Stop ejabberd:<br /> ejabberdctl stop<br /> You may see an error message in the log files, it’s normal, so don’t worry:<br /> Mnesia(ejabberd@newmachine):<br /> ** ERROR ** (ignoring core)<br /> ** FATAL ** A fallback is installed and Mnesia must be restarted.<br /> Forcing shutdown after mnesia_down from ejabberd@newmachine...<br /> Now you can finally start ejabberd:<br /> ejabberdctl start<br /> Check that the information of the old database is available: accounts, rosters... After you finish, remember to delete the temporary backup files from public directories.</p> Tue, 07 Apr 2015 17:55:49 +0000 dillonhd comment 65442 at https://www.ejabberd.im 4.5 Change Computer https://www.ejabberd.im/node/24841#comment-65441 <p>4.5 Change Computer Hostname</p> <p>ejabberd uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the Erlang node in it (see section 5.4). The name of an Erlang node includes the hostname of the computer. So, the name of the Erlang node changes if you change the name of the machine in which ejabberd runs, or when you move ejabberd to a different machine.</p> <p>You have two ways to use the old Mnesia database in an ejabberd with new node name: put the old node name in ejabberdctl.cfg, or convert the database to the new node name.</p> <p>Those example steps will backup, convert and load the Mnesia database. You need to have either the old Mnesia spool dir or a backup of Mnesia. If you already have a backup file of the old database, you can go directly to step 5. You also need to know the old node name and the new node name. If you don’t know them, look for them by executing ejabberdctl or in the ejabberd log files.</p> <p>Before starting, setup some variables:</p> <p>OLDNODE=ejabberd@oldmachine<br /> NEWNODE=ejabberd@newmachine<br /> OLDFILE=/tmp/old.backup<br /> NEWFILE=/tmp/new.backup<br /> Start ejabberd enforcing the old node name:<br /> ejabberdctl --node $OLDNODE start<br /> Generate a backup file:<br /> ejabberdctl --node $OLDNODE backup $OLDFILE<br /> Stop the old node:<br /> ejabberdctl --node $OLDNODE stop<br /> Make sure there aren’t files in the Mnesia spool dir. For example:<br /> mkdir /var/lib/ejabberd/oldfiles<br /> mv /var/lib/ejabberd/*.* /var/lib/ejabberd/oldfiles/<br /> Start ejabberd. There isn’t any need to specify the node name anymore:<br /> ejabberdctl start<br /> Convert the backup to new node name:<br /> ejabberdctl mnesia_change_nodename $OLDNODE $NEWNODE $OLDFILE $NEWFILE<br /> Install the backup file as a fallback:<br /> ejabberdctl install_fallback $NEWFILE<br /> Stop ejabberd:<br /> ejabberdctl stop<br /> You may see an error message in the log files, it’s normal, so don’t worry:<br /> Mnesia(ejabberd@newmachine):<br /> ** ERROR ** (ignoring core)<br /> ** FATAL ** A fallback is installed and Mnesia must be restarted.<br /> Forcing shutdown after mnesia_down from ejabberd@newmachine...<br /> Now you can finally start ejabberd:<br /> ejabberdctl start<br /> Check that the information of the old database is available: accounts, rosters... After you finish, remember to delete the temporary backup files from public directories.</p> Tue, 07 Apr 2015 17:55:38 +0000 dillonhd comment 65441 at https://www.ejabberd.im 4.5 Change Computer https://www.ejabberd.im/node/24841#comment-65440 <p>4.5 Change Computer Hostname</p> <p>ejabberd uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the Erlang node in it (see section 5.4). The name of an Erlang node includes the hostname of the computer. So, the name of the Erlang node changes if you change the name of the machine in which ejabberd runs, or when you move ejabberd to a different machine.</p> <p>You have two ways to use the old Mnesia database in an ejabberd with new node name: put the old node name in ejabberdctl.cfg, or convert the database to the new node name.</p> <p>Those example steps will backup, convert and load the Mnesia database. You need to have either the old Mnesia spool dir or a backup of Mnesia. If you already have a backup file of the old database, you can go directly to step 5. You also need to know the old node name and the new node name. If you don’t know them, look for them by executing ejabberdctl or in the ejabberd log files.</p> <p>Before starting, setup some variables:</p> <p>OLDNODE=ejabberd@oldmachine<br /> NEWNODE=ejabberd@newmachine<br /> OLDFILE=/tmp/old.backup<br /> NEWFILE=/tmp/new.backup<br /> Start ejabberd enforcing the old node name:<br /> ejabberdctl --node $OLDNODE start<br /> Generate a backup file:<br /> ejabberdctl --node $OLDNODE backup $OLDFILE<br /> Stop the old node:<br /> ejabberdctl --node $OLDNODE stop<br /> Make sure there aren’t files in the Mnesia spool dir. For example:<br /> mkdir /var/lib/ejabberd/oldfiles<br /> mv /var/lib/ejabberd/*.* /var/lib/ejabberd/oldfiles/<br /> Start ejabberd. There isn’t any need to specify the node name anymore:<br /> ejabberdctl start<br /> Convert the backup to new node name:<br /> ejabberdctl mnesia_change_nodename $OLDNODE $NEWNODE $OLDFILE $NEWFILE<br /> Install the backup file as a fallback:<br /> ejabberdctl install_fallback $NEWFILE<br /> Stop ejabberd:<br /> ejabberdctl stop<br /> You may see an error message in the log files, it’s normal, so don’t worry:<br /> Mnesia(ejabberd@newmachine):<br /> ** ERROR ** (ignoring core)<br /> ** FATAL ** A fallback is installed and Mnesia must be restarted.<br /> Forcing shutdown after mnesia_down from ejabberd@newmachine...<br /> Now you can finally start ejabberd:<br /> ejabberdctl start<br /> Check that the information of the old database is available: accounts, rosters... After you finish, remember to delete the temporary backup files from public directories.</p> Tue, 07 Apr 2015 17:55:33 +0000 dillonhd comment 65440 at https://www.ejabberd.im 4.5 Change Computer https://www.ejabberd.im/node/24841#comment-65439 <p>4.5 Change Computer Hostname</p> <p>ejabberd uses the distributed Mnesia database. Being distributed, Mnesia enforces consistency of its file, so it stores the name of the Erlang node in it (see section 5.4). The name of an Erlang node includes the hostname of the computer. So, the name of the Erlang node changes if you change the name of the machine in which ejabberd runs, or when you move ejabberd to a different machine.</p> <p>You have two ways to use the old Mnesia database in an ejabberd with new node name: put the old node name in ejabberdctl.cfg, or convert the database to the new node name.</p> <p>Those example steps will backup, convert and load the Mnesia database. You need to have either the old Mnesia spool dir or a backup of Mnesia. If you already have a backup file of the old database, you can go directly to step 5. You also need to know the old node name and the new node name. If you don’t know them, look for them by executing ejabberdctl or in the ejabberd log files.</p> <p>Before starting, setup some variables:</p> <p>OLDNODE=ejabberd@oldmachine<br /> NEWNODE=ejabberd@newmachine<br /> OLDFILE=/tmp/old.backup<br /> NEWFILE=/tmp/new.backup<br /> Start ejabberd enforcing the old node name:<br /> ejabberdctl --node $OLDNODE start<br /> Generate a backup file:<br /> ejabberdctl --node $OLDNODE backup $OLDFILE<br /> Stop the old node:<br /> ejabberdctl --node $OLDNODE stop<br /> Make sure there aren’t files in the Mnesia spool dir. For example:<br /> mkdir /var/lib/ejabberd/oldfiles<br /> mv /var/lib/ejabberd/*.* /var/lib/ejabberd/oldfiles/<br /> Start ejabberd. There isn’t any need to specify the node name anymore:<br /> ejabberdctl start<br /> Convert the backup to new node name:<br /> ejabberdctl mnesia_change_nodename $OLDNODE $NEWNODE $OLDFILE $NEWFILE<br /> Install the backup file as a fallback:<br /> ejabberdctl install_fallback $NEWFILE<br /> Stop ejabberd:<br /> ejabberdctl stop<br /> You may see an error message in the log files, it’s normal, so don’t worry:<br /> Mnesia(ejabberd@newmachine):<br /> ** ERROR ** (ignoring core)<br /> ** FATAL ** A fallback is installed and Mnesia must be restarted.<br /> Forcing shutdown after mnesia_down from ejabberd@newmachine...<br /> Now you can finally start ejabberd:<br /> ejabberdctl start<br /> Check that the information of the old database is available: accounts, rosters... After you finish, remember to delete the temporary backup files from public directories.</p> Tue, 07 Apr 2015 17:55:29 +0000 dillonhd comment 65439 at https://www.ejabberd.im Which documentation are your https://www.ejabberd.im/node/24841#comment-65433 <p>Which documentation are your referring to ?</p> Tue, 07 Apr 2015 08:31:11 +0000 mremond comment 65433 at https://www.ejabberd.im