public class BackupManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BACKUP_NAME_PROP |
static String |
BACKUP_PROPS_FILE |
static String |
COLLECTION_NAME_PROP |
static String |
COLLECTION_PROPS_FILE |
static String |
CONFIG_STATE_DIR |
static String |
INDEX_VERSION_PROP |
protected BackupRepository |
repository |
static String |
START_TIME_PROP |
static String |
ZK_STATE_DIR |
protected ZkStateReader |
zkStateReader |
Constructor and Description |
---|
BackupManager(BackupRepository repository,
ZkStateReader zkStateReader) |
Modifier and Type | Method and Description |
---|---|
void |
downloadConfigDir(URI backupLoc,
String backupId,
String configName)
This method stores the contents of a specified Solr config at the specified location in repository.
|
String |
getVersion() |
Properties |
readBackupProperties(URI backupLoc,
String backupId)
This method returns the configuration parameters for the specified backup.
|
DocCollection |
readCollectionState(URI backupLoc,
String backupId,
String collectionName)
This method reads the meta-data information for the backed-up collection.
|
void |
uploadConfigDir(URI backupLoc,
String backupId,
String sourceConfigName,
String targetConfigName)
This method uploads the Solr configuration files to the desired location in Zookeeper.
|
void |
writeBackupProperties(URI backupLoc,
String backupId,
Properties props)
This method stores the backup properties at the specified location in the repository.
|
void |
writeCollectionState(URI backupLoc,
String backupId,
String collectionName,
DocCollection collectionState)
This method writes the collection meta-data to the specified location in the repository.
|
public static final String COLLECTION_PROPS_FILE
public static final String BACKUP_PROPS_FILE
public static final String ZK_STATE_DIR
public static final String CONFIG_STATE_DIR
public static final String COLLECTION_NAME_PROP
public static final String BACKUP_NAME_PROP
public static final String INDEX_VERSION_PROP
public static final String START_TIME_PROP
protected final ZkStateReader zkStateReader
protected final BackupRepository repository
public BackupManager(BackupRepository repository, ZkStateReader zkStateReader)
public final String getVersion()
public Properties readBackupProperties(URI backupLoc, String backupId) throws IOException
backupLoc
- The base path used to store the backup data.backupId
- The unique name for the backup whose configuration params are required.IOException
- In case of errors.public void writeBackupProperties(URI backupLoc, String backupId, Properties props) throws IOException
backupLoc
- The base path used to store the backup data.backupId
- The unique name for the backup whose configuration params are required.props
- The backup propertiesIOException
- in case of I/O errorpublic DocCollection readCollectionState(URI backupLoc, String backupId, String collectionName) throws IOException
backupLoc
- The base path used to store the backup data.backupId
- The unique name for the backup.collectionName
- The name of the collection whose meta-data is to be returned.IOException
- in case of errors.public void writeCollectionState(URI backupLoc, String backupId, String collectionName, DocCollection collectionState) throws IOException
backupLoc
- The base path used to store the backup data.backupId
- The unique name for the backup.collectionName
- The name of the collection whose meta-data is being stored.collectionState
- The collection meta-data to be stored.IOException
- in case of I/O errors.public void uploadConfigDir(URI backupLoc, String backupId, String sourceConfigName, String targetConfigName) throws IOException
backupLoc
- The base path used to store the backup data.backupId
- The unique name for the backup.sourceConfigName
- The name of the config to be copiedtargetConfigName
- The name of the config to be created.IOException
- in case of I/O errors.public void downloadConfigDir(URI backupLoc, String backupId, String configName) throws IOException
backupLoc
- The base path used to store the backup data.backupId
- The unique name for the backup.configName
- The name of the config to be saved.IOException
- in case of I/O errors.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.