Currently using aws as my db hosting. Instead of using RDS I am using instances to include mariaDB and distribute few instances over different region for replication.
Everything works fine but because using instances, aws does not back up automatically so now I am creating a crontab
job to run an aws cli
to create image automatically. I am still in testing phase but then I found out, each time when I run the script and aws does create an image of the instance BUT the catch is, mariaDB would stop completely and would not start up automatically.
I actually got it fixed but wonder if people know about this and if there is a way to prevent this.
I have googled then tried running galera_new_cluster
on the 1st node
which then showed error about file named grastate.dat
that I can change the bootstrap
value from 0 to 1
.
I did that, then run the galera_new_cluster
again which then worked perfectly to start up mariadb
, then I have to go to other dbs
and start them manually.
At first, I thought this would be then fixed but guess not. I tried running the aws cli
to create image of the instance again. The dbs all went down again. the bootstrap
value is back to 0
that I have to set it to 1
and run all those commands again and to other server too.
I thought of writing a script to do it step by step each time after creating an image but it would be kinda a hassle.
Does anyone know about this situation or a way to fix it permanently?
Thanks in advance for any ideas.
0 Answers