Class BackupManager


  • public class BackupManager
    extends Object
    This class implements functionality to create a backup with extension points provided to integrate with different types of file-systems.
    • Method Detail

      • getVersion

        public final String getVersion()
        Returns:
        The version of this backup implementation.
      • readBackupProperties

        public Properties readBackupProperties​(URI backupLoc,
                                               String backupId)
                                        throws IOException
        This method returns the configuration parameters for the specified backup.
        Parameters:
        backupLoc - The base path used to store the backup data.
        backupId - The unique name for the backup whose configuration params are required.
        Returns:
        the configuration parameters for the specified backup.
        Throws:
        IOException - In case of errors.
      • writeBackupProperties

        public void writeBackupProperties​(URI backupLoc,
                                          String backupId,
                                          Properties props)
                                   throws IOException
        This method stores the backup properties at the specified location in the repository.
        Parameters:
        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 properties
        Throws:
        IOException - in case of I/O error
      • readCollectionState

        public DocCollection readCollectionState​(URI backupLoc,
                                                 String backupId,
                                                 String collectionName)
                                          throws IOException
        This method reads the meta-data information for the backed-up collection.
        Parameters:
        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.
        Returns:
        the meta-data information for the backed-up collection.
        Throws:
        IOException - in case of errors.
      • writeCollectionState

        public void writeCollectionState​(URI backupLoc,
                                         String backupId,
                                         String collectionName,
                                         DocCollection collectionState)
                                  throws IOException
        This method writes the collection meta-data to the specified location in the repository.
        Parameters:
        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.
        Throws:
        IOException - in case of I/O errors.
      • uploadConfigDir

        public void uploadConfigDir​(URI backupLoc,
                                    String backupId,
                                    String sourceConfigName,
                                    String targetConfigName)
                             throws IOException
        This method uploads the Solr configuration files to the desired location in Zookeeper.
        Parameters:
        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 copied
        targetConfigName - The name of the config to be created.
        Throws:
        IOException - in case of I/O errors.
      • downloadConfigDir

        public void downloadConfigDir​(URI backupLoc,
                                      String backupId,
                                      String configName)
                               throws IOException
        This method stores the contents of a specified Solr config at the specified location in repository.
        Parameters:
        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.
        Throws:
        IOException - in case of I/O errors.