HA must not be actived when migrate sqlite to mysql
This commit is contained in:
parent
6a75234cb8
commit
e6729673fb
|
@ -44,7 +44,7 @@ function updateDB()
|
|||
|
||||
function to_mysql() {
|
||||
if [ "$script" = 'instance' ] && [ $(CreoleGet one_database_type) = "mysql" ] && [ $(CreoleGet one_ha_role leader) = "leader" ]; then
|
||||
Question_ouinon "Voulez-vous migrer de SQLite à Mysql ?" "True" "non" "warn"
|
||||
Question_ouinon "Voulez-vous migrer de SQLite à Mysql ?" "True" "oui" "warn"
|
||||
rep=$(echo "$?")
|
||||
if [ "$rep" == "0" ]; then
|
||||
# do not recover db on follower
|
||||
|
@ -52,7 +52,12 @@ function to_mysql() {
|
|||
DB=$(CreoleGet one_database_name)
|
||||
USER=$(CreoleGet one_database_user)
|
||||
PASS=$(CreoleGet one_database_pass)
|
||||
cp -a /etc/one/oned.conf /etc/one/oned.conf.ori
|
||||
# HA ne doit pas être activer pour la migration
|
||||
CreoleCat -s /usr/share/eole/creole/distrib/oned-ha-mysql.conf -o /etc/one/oned.conf
|
||||
oned -i
|
||||
onedb sqlite2mysql -s /var/lib/one/one.db -u $USER -p $PASS -d $DB -S $HOST
|
||||
cp -a /etc/one/oned.conf.ori /etc/one/oned.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
%set global %%enable_one_ha='non'
|
||||
%include '/var/lib/creole/oned.conf'
|
Loading…
Reference in New Issue