<xml></xml>

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++

Berkeley DB .NET API Documentation
DatabaseEnvironment..::.BackupDatabase Method
DatabaseEnvironment Class See Also Send Feedback

Perform a hot back up of a single database file contained within the environment.

To back up the entire environment, use the Backup(String, BackupOptions) method.

You can make some tuning modifications to the backup process using the BackupReadCount, BackupReadSleepDuration, BackupBufferSize, and BackupWriteDirect properties. Alternatively, you can write your own custom hot back up facility using the IBackup interface.

Namespace: BerkeleyDB
Assembly: libdb_dotnet60 (in libdb_dotnet60.dll) Version: 6.0.30.0

# Syntax

C#

    public void BackupDatabase(
    	string target,
    	string database,
    	bool must_create
    )

Visual Basic (Declaration)

    Public Sub BackupDatabase ( _
    	target As String, _
    	database As String, _
    	must_create As Boolean _
    )

Visual C++

    public:
    void BackupDatabase(
    	String^ target,
    	String^ database,
    	bool must_create
    )

#### Parameters

target
  Type: System..::.String
  Identifies the directory in which the back up will be placed.

database
  Type: System..::.String
  The database file that you want to back up.

must_create
  Type: System..::.Boolean
  If true, then if the target file exists, this method throws an exception.

# See Also

DatabaseEnvironment Class
BerkeleyDB Namespace