Restore Solr collections on CDP cluster
To restore the data on Solr managed by Cloudera Manager, you must start HDFS and Zookeeper only. This ensures no operations are performed by services which can push data to Solr.
-
After migrating to CDP Private Cloud Base, you must update the
infra_solr section ini
file by collecting properties from Solr on Cloudera Manager. (keep a backup of the existing file);-
-
protocol: Solr protocol (http if TLS is not enabled https if TLS is enabled)
-
hosts: Solr server hosts
-
zk_connect_string: Solr Zookeeper connection string, should be available as part of process Environment Variables
-
znode: Solr Znode configured, default value is /solr_ user : Solr service
-
user: default value is solr
-
port: Solr Server port, default 8983 and 8985 when TLS is enabled for Solr
-
keytab: Absolute path for Solr keytab
-
principal: Solr Service principal
-
zk_principal_user: Zookeeper principal
-
-
-
After updating the ini configuration file, restore the solr collections using AM2CM 2.0.0.0 tool
- To change ownership of the Solr data in
HDFS
python restore_collections.py --ini-file $CONFIG_INI_LOCATION --action change-ownership-in-hdfs
- To delete newly created default Cloudera Manager Solr
collections
python restore_collections.py --ini-file $CONFIG_INI_LOCATION --action delete-new-solr-collections
- To restore original
collections
python restore_collections.py --ini-file $CONFIG_INI_LOCATION --action full-restore
- To change ownership of the Solr data in
HDFS
-
If you do not want to update the ini file you can have the same parameters handy and
pass them as arguments to the above three commands.
-
python restore_collections.py --ini-file $CONFIG_INI_LOCATION --action change-ownership-in-hdfs --protocol=<Solr service protocol> --hosts=<Solr Server Hosts comma separated> --zk-connect-string=<Zookeeper Connection String> --znode=/solr-infra --user=solr --port=8985 --keytab=<full path to solr.keytab> --principal=<Solr principal> --zk-principal-user=<Zookeeper principal>
-
python restore_collections.py --ini-file $CONFIG_INI_LOCATION --action delete-new-solr-collections --action change-ownership-in-hdfs --protocol=<Solr service protocol> --hosts=<Solr Server Hosts comma separated> --zk-connect-string=<Zookeeper Connection String> --znode=/solr-infra --user=solr --port=8985 --keytab=<full path to solr.keytab> --principal=<Solr principal> --zk-principal-user=<Zookeeper principal>
-
python restore_collections.py --ini-file $CONFIG_INI_LOCATION --action full-restore --action change-ownership-in-hdfs --protocol=<Solr service protocol> --hosts=<Solr Server Hosts comma separated> --zk-connect-string=<Zookeeper Connection String> --znode=/solr-infra --user=solr --port=8985 --keytab=<full path to solr.keytab> --principal=<Solr principal> --zk-principal-user=<Zookeeper principal>
-