com.sleepycat.db

## Class BackupOptions

- java.lang.Object
- - com.sleepycat.db.BackupOptions

- All Implemented Interfaces:
    java.lang.Cloneable

      public class BackupOptions
      extends java.lang.Object
      implements java.lang.Cloneable

  Options for `Environment.backup(java.lang.String, com.sleepycat.db.BackupOptions)` operations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static BackupOptions` | `DEFAULT` Default configuration used if null is passed to methods that create a cursor.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackupOptions()` Construct a default options object for backup operations.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getAllowCreate()` Whether the target directory will be created if it does not already exist.
    `boolean` | `getClean()` Whether the target backup directory should be cleaned.
    `boolean` | `getExclusiveCreate()` Whether the target directory will be exclusively created.
    `boolean` | `getFiles()` Whether ordinary files are included in the hot backup.
    `boolean` | `getNoLogs()` Whether log files are included in the backup.
    `boolean` | `getSingleDir()` Whether all backed up files are to be placed in a single directory.
    `boolean` | `getUpdate()` Whether an incremental backup will be performed.
    `void` | `setAllowCreate(boolean allowcreate)` Sets whether the target directory will be created if it does not already exist.
    `void` | `setClean(boolean clean)` Sets whether to clean the target backup directory.
    `void` | `setExclusiveCreate(boolean exclusivecreate)` Sets whether the target directory will be exclusively created.
    `void` | `setFiles(boolean files)` Sets whether all ordinary files will be backed up.
    `void` | `setNoLogs(boolean nologs)` Sets whether log files are skipped in the backup.
    `void` | `setSingleDir(boolean singledir)` Sets whether all backed up files are to be placed in a single directory.
    `void` | `setUpdate(boolean update)` Sets whether to perform an incremental back up.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT

          public static final BackupOptions DEFAULT

      Default configuration used if null is passed to methods that create a cursor.

  - ### Constructor Detail

    - #### BackupOptions

          public BackupOptions()

      Construct a default options object for backup operations.

  - ### Method Detail

    - #### 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 a `DatabaseException` exception.

    - #### 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 `DatabaseException` exception.

    - #### 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 a `DatabaseException` exception.

    - #### 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 `DatabaseException` exception.

Copyright (c) 1996, 2017 Oracle and/or its affiliates. All rights reserved.