Class SnapshotBackupAPI
- java.lang.Object
-
- org.apache.solr.api.JerseyResource
-
- org.apache.solr.handler.admin.api.SnapshotBackupAPI
-
@Path("/cores/{coreName}/replication/backups") public class SnapshotBackupAPI extends JerseyResource
V2 endpoint for Backup API used for User-Managed clusters and Single-Node Installation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SnapshotBackupAPI.BackupReplicationRequestBody
static class
SnapshotBackupAPI.BackupReplicationResponse
Response forcreateBackup(BackupReplicationRequestBody)
.
-
Field Summary
-
Fields inherited from class org.apache.solr.api.JerseyResource
containerRequestContext
-
-
Constructor Summary
Constructors Constructor Description SnapshotBackupAPI(SolrCore solrCore, ReplicationHandler.ReplicationHandlerConfig replicationHandlerConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnapshotBackupAPI.BackupReplicationResponse
createBackup(SnapshotBackupAPI.BackupReplicationRequestBody backupReplicationPayload)
This API (POST /api/cores/coreName/replication/backups {...}) is analogous to the v1 /solr/coreName/replication?command=backupprotected void
doSnapShoot(int numberToKeep, int numberBackupsToKeep, String location, String repoName, String commitName, String name, SolrCore solrCore, Consumer<org.apache.solr.common.util.NamedList<?>> resultConsumer)
Separate method helps with testing-
Methods inherited from class org.apache.solr.api.JerseyResource
ensureRequiredParameterProvided, ensureRequiredRequestBodyProvided, instantiateJerseyResponse, instantiateJerseyResponse
-
-
-
-
Constructor Detail
-
SnapshotBackupAPI
@Inject public SnapshotBackupAPI(SolrCore solrCore, ReplicationHandler.ReplicationHandlerConfig replicationHandlerConfig)
-
-
Method Detail
-
createBackup
@POST @Produces({"application/json","application/xml","application/vnd.apache.solr.javabin"}) public SnapshotBackupAPI.BackupReplicationResponse createBackup(SnapshotBackupAPI.BackupReplicationRequestBody backupReplicationPayload) throws Exception
This API (POST /api/cores/coreName/replication/backups {...}) is analogous to the v1 /solr/coreName/replication?command=backup- Throws:
Exception
-
doSnapShoot
protected void doSnapShoot(int numberToKeep, int numberBackupsToKeep, String location, String repoName, String commitName, String name, SolrCore solrCore, Consumer<org.apache.solr.common.util.NamedList<?>> resultConsumer) throws IOException
Separate method helps with testing- Throws:
IOException
-
-