Package com.sleepycat.db
Class BackupOptions
java.lang.Object
com.sleepycat.db.BackupOptions
- All Implemented Interfaces:
Cloneable
Options for
Environment.backup(java.lang.String, com.sleepycat.db.BackupOptions) operations.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BackupOptionsDefault configuration used if null is passed to methods that create a cursor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the target directory will be created if it does not already exist.booleangetClean()Whether the target backup directory should be cleaned.booleanWhether the target directory will be exclusively created.booleangetFiles()Whether ordinary files are included in the hot backup.booleanWhether log files are included in the backup.booleanWhether all backed up files are to be placed in a single directory.booleanWhether an incremental backup will be performed.voidsetAllowCreate(boolean allowcreate) Sets whether the target directory will be created if it does not already exist.voidsetClean(boolean clean) Sets whether to clean the target backup directory.voidsetExclusiveCreate(boolean exclusivecreate) Sets whether the target directory will be exclusively created.voidsetFiles(boolean files) Sets whether all ordinary files will be backed up.voidsetNoLogs(boolean nologs) Sets whether log files are skipped in the backup.voidsetSingleDir(boolean singledir) Sets whether all backed up files are to be placed in a single directory.voidsetUpdate(boolean update) Sets whether to perform an incremental back up.
-
Field Details
-
DEFAULT
Default configuration used if null is passed to methods that create a cursor.
-
-
Constructor Details
-
BackupOptions
public BackupOptions()Construct a default options object for backup operations.
-
-
Method Details
-
setClean
public void setClean(boolean clean) Sets whether to clean the target backup directory.- Parameters:
clean- If true, all files are removed from the target backup directory before the back up is performed.
-
getClean
public boolean getClean()Whether the target backup directory should be cleaned.- Returns:
- true if the all files are removed from the target backup directory before performing the backup.
-
setFiles
public void setFiles(boolean files) Sets whether all ordinary files will be backed up.- Parameters:
files- If true, all ordinary files that might exist in the environment, as well as might exist in the environment's subdirectories, are backed up; otherwise, only files necessary for the proper operation of Berkeley DB are backed up.
-
getFiles
public boolean getFiles()Whether ordinary files are included in the hot backup.- Returns:
- true if ordinary files are included in the backup.
-
setNoLogs
public void setNoLogs(boolean nologs) Sets whether log files are skipped in the backup.- Parameters:
nologs- If true, log files are not included in the backup. Instead, only *.db files are copied to the target directory.
-
getNoLogs
public boolean getNoLogs()Whether log files are included in the backup.- Returns:
- true if log files will not be included in the backup. Instead, only *.db files are copied to the target directory.
-
setSingleDir
public void setSingleDir(boolean singledir) Sets whether all backed up files are to be placed in a single directory.- Parameters:
singledir- If true, then regardless of the directory structure used by the source environment, place all back up files in the single target directory Use this option if absolute path names to your environment directory and the files within that directory are required by your application.
-
getSingleDir
public boolean getSingleDir()Whether all backed up files are to be placed in a single directory.- Returns:
- true if all the backup files will be placed in a single target directory regardless of the directory structure used by the source environment.
-
setUpdate
public void setUpdate(boolean update) Sets whether to perform an incremental back up.- Parameters:
update- If true, perform an incremental back up, instead of a full back up. When this option is specified, only log files are copied to the target directory.
-
getUpdate
public boolean getUpdate()Whether an incremental backup will be performed.- Returns:
- true if an incremental backup, instead of a full backup, will be performed. Also, if true, then only log files are copied to the target directory.
-
setAllowCreate
public void setAllowCreate(boolean allowcreate) Sets whether the target directory will be created if it does not already exist.- Parameters:
allowcreate- If true, then create the target directory and any subdirectories as required to perform the backup; otherwise, any missing directories will result in the backup operation throwing aDatabaseExceptionexception.
-
getAllowCreate
public boolean getAllowCreate()Whether the target directory will be created if it does not already exist.- Returns:
- true if the backup operation will create the target directory and any
subdirectories as required to perform the backup; otherwise, any
missing directories will result in the backup operation throwing a
DatabaseExceptionexception.
-
setExclusiveCreate
public void setExclusiveCreate(boolean exclusivecreate) Sets whether the target directory will be exclusively created.- Parameters:
exclusivecreate- If true, then the backup operation will create the target directory and any required subdirectories. If the target directory currently exists, the backup operation will throw aDatabaseExceptionexception.
-
getExclusiveCreate
public boolean getExclusiveCreate()Whether the target directory will be exclusively created.- Returns:
- true if the backup operation will create the target directory and
any required subdirectories. If the target directory currently exists,
the backup operation will throw a
DatabaseExceptionexception.
-