Package org.apache.solr.core.backup
Class BackupProperties
- java.lang.Object
-
- org.apache.solr.core.backup.BackupProperties
-
public class BackupProperties extends Object
Represents a backup[-*].properties file, responsible for holding whole-collection and whole-backup metadata.These files live in a different location and hold different metadata depending on the backup format used. The (now deprecated) traditional 'full-snapshot' backup format places this file at $LOCATION/$NAME, while the preferred incremental backup format stores these files in $LOCATION/$NAME/$COLLECTION.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcountIndexFiles(int numFiles, double sizeMB)static BackupPropertiescreate(String backupName, String collectionName, String extCollectionName, String configName, Map<String,String> extraProperties)List<String>getAllShardBackupMetadataFiles()StringgetBackupName()StringgetCollection()StringgetCollectionAlias()StringgetConfigName()Map<String,Object>getDetails()StringgetEndTime()Map<String,String>getExtraProperties()StringgetIndexVersion()Optional<ShardBackupId>getShardBackupIdFor(String shardName)StringgetStartTime()ShardBackupIdputAndGetShardBackupIdFor(String shardName, int backupId)static BackupPropertiesreadFrom(BackupRepository repository, URI backupPath, String fileName)static Optional<BackupProperties>readFromLatest(BackupRepository repository, URI backupPath)voidstore(Writer propsWriter)
-
-
-
Method Detail
-
create
public static BackupProperties create(String backupName, String collectionName, String extCollectionName, String configName, Map<String,String> extraProperties)
-
readFromLatest
public static Optional<BackupProperties> readFromLatest(BackupRepository repository, URI backupPath) throws IOException
- Throws:
IOException
-
readFrom
public static BackupProperties readFrom(BackupRepository repository, URI backupPath, String fileName) throws IOException
- Throws:
IOException
-
countIndexFiles
public void countIndexFiles(int numFiles, double sizeMB)
-
getShardBackupIdFor
public Optional<ShardBackupId> getShardBackupIdFor(String shardName)
-
putAndGetShardBackupIdFor
public ShardBackupId putAndGetShardBackupIdFor(String shardName, int backupId)
-
store
public void store(Writer propsWriter) throws IOException
- Throws:
IOException
-
getCollection
public String getCollection()
-
getCollectionAlias
public String getCollectionAlias()
-
getConfigName
public String getConfigName()
-
getStartTime
public String getStartTime()
-
getEndTime
public String getEndTime()
-
getIndexVersion
public String getIndexVersion()
-
getBackupName
public String getBackupName()
-
-