net.sf.farrago.syslib
Class FarragoSystemBackup
java.lang.Object
net.sf.farrago.syslib.FarragoSystemBackup
public class FarragoSystemBackup
- extends Object
FarragoSystemBackup implements hot backup of the Farrago catalog and Fennel
data, provided Fennel supports versioning. Full, incremental, and
differential backups are supported, and the backup files can be optionally
compressed.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/syslib/FarragoSystemBackup.java#5 $
- Author:
- Zelaine Fong
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tracer
private static final Logger tracer
archiveDirectory
private String archiveDirectory
backupType
private String backupType
compressionMode
private String compressionMode
checkSpace
private boolean checkSpace
padding
private long padding
reposTxnContext
private FarragoReposTxnContext reposTxnContext
repos
private FarragoRepos repos
type
private FarragoBackupType type
systemRepos
private FarragoRepos systemRepos
fennelDbHandle
private FennelDbHandle fennelDbHandle
isCompressed
private boolean isCompressed
lowerBoundCsn
Long lowerBoundCsn
upperBoundCsn
Long upperBoundCsn
dbSize
Long dbSize
timingTracer
private EigenbaseTimingTracer timingTracer
FarragoSystemBackup
public FarragoSystemBackup(String archiveDirectory,
String backupType,
String compressionMode,
boolean checkSpace,
long padding)
backupDatabase
public void backupDatabase()
throws Exception
- Backs up the database.
- Throws:
Exception
initiateBackup
private void initiateBackup(FennelExecutionHandle execHandle)
throws Exception
- Executes the initial portion of the backup, which includes backing up
Fennel metadata pages and the Farrago catalog. During this portion of the
backup, the catalog is locked.
- Parameters:
execHandle
- execution handle to associate with the Fennel command
- Throws:
Exception
writeBackupPropertyFile
private void writeBackupPropertyFile(String archiveDirectory,
String backupType,
String compressionMode,
String dbSize,
String lowerBoundCsn,
String upperBoundCsn)
throws Exception
- Throws:
Exception
getLowerBoundCsn
private long getLowerBoundCsn(FarragoBackupType backupType,
List<FarragoCatalogUtil.BackupData> backupData)
- Determines the lower bound csn for the current backup based on the type
of the backup and previous backup data.
- Parameters:
backupType
- the type of the current backupbackupData
- information on backups completed
- Returns:
- the lower bound csn of the current backup