Skip to content

Apache Lucene open-source search software

SOLR-12523: Improve error reporting and docs regarding Collection backup feature shared-fs requirement

Jan Høydahlf3339d14c9ff
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f515c7ee92b..94f20c664d0 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -272,6 +272,8 @@ Other Changes
* SOLR-12208: Renamed the autoscaling variable 'INDEX.sizeInBytes' to 'INDEX.sizeInGB' (noble)
+* SOLR-12523: Improve error reporting and docs regarding Collection backup feature shared-fs requirement (janhoy)
+
* SOLR-12468: Upgrade Jetty to 9.4.11.v20180605 (Michael Braun, shalin)
* SOLR-12527: factor out a test-framework/ConfigRequest class (Christine Poerschke)
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
index c8e99dce4ce..b8aba7632bf 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/BackupCmd.java
@@ -221,6 +221,6 @@ public class BackupCmd implements OverseerCollectionMessageHandler.Cmd {
}
log.debug("Sent backup requests to all shard leaders for backupName={}", backupName);
- ocmh.processResponses(results, shardHandler, true, "Could not backup all replicas", asyncId, requestMap);
+ ocmh.processResponses(results, shardHandler, true, "Could not backup all shards", asyncId, requestMap);
}
}
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java b/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
index c17ec3cfd31..503eed03a3b 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/BackupCoreOp.java
@@ -60,7 +60,9 @@ class BackupCoreOp implements CoreAdminHandler.CoreAdminOp {
// file system. Otherwise, perhaps the FS location isn't shared -- we want an error.
if (!snapShooter.getBackupRepository().exists(snapShooter.getLocation())) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
- "Directory to contain snapshots doesn't exist: " + snapShooter.getLocation());
+ "Directory to contain snapshots doesn't exist: " + snapShooter.getLocation() + ". " +
+ "Note that Backup/Restore of a SolrCloud collection " +
+ "requires a shared file system mounted at the same path on all nodes!");
}
snapShooter.validateCreateSnapshot();
snapShooter.createSnapshot();
diff --git a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
index 291b4d5b766..61576c73971 100644
--- a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
+++ b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
@@ -24,6 +24,8 @@ Solr provides two approaches to backing up and restoring Solr cores or collectio
Support for backups when running SolrCloud is provided with the <<collections-api.adoc#collections-api,Collections API>>. This allows the backups to be generated across multiple shards, and restored to the same number of shards and replicas as the original collection.
+NOTE: SolrCloud Backup/Restore requires a shared file system mounted at the same path on all nodes, or HDFS.
+
Two commands are available:
* `action=BACKUP`: This command backs up Solr indexes and configurations. More information is available in the section <<collections-api.adoc#backup,Backup Collection>>.