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 void
countIndexFiles(int numFiles, double sizeMB)
static BackupProperties
create(String backupName, String collectionName, String extCollectionName, String configName, Map<String,String> extraProperties)
List<String>
getAllShardBackupMetadataFiles()
String
getBackupName()
String
getCollection()
String
getCollectionAlias()
String
getConfigName()
Map<String,Object>
getDetails()
String
getEndTime()
Map<String,String>
getExtraProperties()
String
getIndexVersion()
Optional<ShardBackupId>
getShardBackupIdFor(String shardName)
String
getStartTime()
ShardBackupId
putAndGetShardBackupIdFor(String shardName, int backupId)
static BackupProperties
readFrom(BackupRepository repository, URI backupPath, String fileName)
static Optional<BackupProperties>
readFromLatest(BackupRepository repository, URI backupPath)
void
store(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()
-
-