이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 10. Restore the Database
Restore the MariaDB database tables on one node. Galera will replicate the database to other nodes automatically.
Procedure
Execute the following to restore the database tables. Ensure the
openstack_database.sqlfile name includes the appropriate timestamp.mysql -u root < openstack_database.sql mysql -u root < grants.sql
[root@overcloud-controller-0]# mysql -u root < openstack_database.sql [root@overcloud-controller-0]# mysql -u root < grants.sqlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Execute
clustercheckon the current node./bin/clustercheck
[root@overcloud-controller-0]# /bin/clustercheckCopy to Clipboard Copied! Toggle word wrap Toggle overflow Test
clustercheckviaxinetd.d:curl overcloud-controller-0.example.com:9200 curl overcloud-controller-1.example.com:9200 curl overcloud-controller-2.example.com:9200
curl overcloud-controller-0.example.com:9200 curl overcloud-controller-1.example.com:9200 curl overcloud-controller-2.example.com:9200Copy to Clipboard Copied! Toggle word wrap Toggle overflow Finally, remove the
iptablesrule from each node to restore access to database.iptables -D INPUT -d 192.168.1.10 -p tcp --dport 3306 -j DROP iptables -D INPUT -d 192.168.1.10 -p tcp --dport 3306 -j DROP iptables -D INPUT -d 192.168.1.10 -p tcp --dport 3306 -j DROP
[root@overcloud-controller-0]# iptables -D INPUT -d 192.168.1.10 -p tcp --dport 3306 -j DROP [root@overcloud-controller-1]# iptables -D INPUT -d 192.168.1.10 -p tcp --dport 3306 -j DROP [root@overcloud-controller-2]# iptables -D INPUT -d 192.168.1.10 -p tcp --dport 3306 -j DROPCopy to Clipboard Copied! Toggle word wrap Toggle overflow
If there are any OpenStack services in pcs status that have a failed status due to problems connecting to database during the restore procedure, run pcs resource cleanup <name> to recover those services.