Package org.apache.solr.core.snapshots
Class SolrSnapshotsTool
- java.lang.Object
-
- org.apache.solr.core.snapshots.SolrSnapshotsTool
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class SolrSnapshotsTool extends Object implements Closeable
This class provides utility functions required for Solr snapshots functionality.
-
-
Constructor Summary
Constructors Constructor Description SolrSnapshotsTool(String solrZkEnsemble)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
backupCollectionMetaData(String collectionName, String snapshotName, String backupLoc)
void
buildCopyListings(String collectionName, String snapshotName, String localFsPath, Optional<String> pathPrefix)
void
close()
void
createSnapshot(String collectionName, String snapshotName)
void
deleteSnapshot(String collectionName, String snapshotName)
void
describeSnapshot(String collectionName, String snapshotName)
void
exportSnapshot(String collectionName, String snapshotName, String destPath, Optional<String> backupRepo, Optional<String> asyncReqId)
Map<String,List<String>>
getIndexFilesPathForSnapshot(String collectionName, String snapshotName, Optional<String> pathPrefix)
void
listSnapshots(String collectionName)
static void
main(String[] args)
void
prepareForExport(String collectionName, String snapshotName, String localFsPath, Optional<String> pathPrefix, String destPath)
-
-
-
Constructor Detail
-
SolrSnapshotsTool
public SolrSnapshotsTool(String solrZkEnsemble)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
listSnapshots
public void listSnapshots(String collectionName)
-
getIndexFilesPathForSnapshot
public Map<String,List<String>> getIndexFilesPathForSnapshot(String collectionName, String snapshotName, Optional<String> pathPrefix) throws SolrServerException, IOException
- Throws:
SolrServerException
IOException
-
buildCopyListings
public void buildCopyListings(String collectionName, String snapshotName, String localFsPath, Optional<String> pathPrefix) throws SolrServerException, IOException
- Throws:
SolrServerException
IOException
-
backupCollectionMetaData
public void backupCollectionMetaData(String collectionName, String snapshotName, String backupLoc) throws SolrServerException, IOException
- Throws:
SolrServerException
IOException
-
prepareForExport
public void prepareForExport(String collectionName, String snapshotName, String localFsPath, Optional<String> pathPrefix, String destPath)
-
exportSnapshot
public void exportSnapshot(String collectionName, String snapshotName, String destPath, Optional<String> backupRepo, Optional<String> asyncReqId)
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
-