Backup Ambari Infra Solr
Backup all your ambari infra solr collections. Execute the Solr APIs to backup the collections individually.
/path/to/backup/
directory must be created first on
the host where the ambari-infra-solr
is installed. The specified
location needs to be accessible to the user by executing the
command.mkdir -p /path/to/backup/directory
chown -R infra-solr:hadoop /path/to/backup
For unsecured cluster
curl -v
"http://$INFRA_SOLR_URL/solr/vertex_index/replication?command=BACKUP&name=vertex_index_backup&location=/path/to/backup/directory"
curl -v
"http://$INFRA_SOLR_URL/solr/edge_index/replication?command=BACKUP&name=edge_index_backup&location=/path/to/backup/directory"
curl -v
"http://$INFRA_SOLR_URL/solr/fulltext_index/replication?command=BACKUP&name=fulltext_index_backup&location=/path/to/backup/directory"
curl -v
"http://$INFRA_SOLR_URL/solr/ranger_audits/replication?command=BACKUP&name=ranger_audits_backup&location=/path/to/backup/directory"
curl -v
"http://$INFRA_SOLR_URL/solr/hadoop_logs/replication?command=BACKUP&name=hadoop_logs_backup&location=/path/to/backup/directory"
curl -v
"http://$INFRA_SOLR_URL/solr/audit_logs/replication?command=BACKUP&name=audit_logs_backup&location=/path/to/backup/directory"
curl -v
"http://$INFRA_SOLR_URL/solr/history/replication?command=BACKUP&name=history_backup&location=/path/to/backup/directory"
For secured cluster If the cluster is
Kerberized, then you must kinit as the service principal.
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/vertex_index/replication?command=BACKUP&name=vertex_index_backup&location=/path/to/backup/directory"
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/edge_index/replication?command=BACKUP&name=edge_index_backup&location=/path/to/backup/directory"
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/fulltext_index/replication?command=BACKUP&name=fulltext_index_backup&location=/path/to/backup/directory"
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/ranger_audits/replication?command=BACKUP&name=ranger_audits_backup&location=/path/to/backup/directory"
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/hadoop_logs/replication?command=BACKUP&name=hadoop_logs_backup&location=/path/to/backup/directory"
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/audit_logs/replication?command=BACKUP&name=audit_logs_backup&location=/path/to/backup/directory"
curl -v --negotiate -u:
"http://$INFRA_SOLR_URL/solr/history/replication?command=BACKUP&name=history_backup&location=/path/to/backup/directory"
It is highly recommended to save the data folder for disaster recovery.