SPDatabaseSnapshotCollection.CreateSnapshot Method

Creates a database snapshot of the current database.

Namespace:  Microsoft.SharePoint.Administration.Backup
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPDatabaseSnapshot CreateSnapshot()

The CreateSnapshot() method calls the RefreshSnapshots() method as part of its implementation.

If the EnabledManagement property has not been set to true or false, the CreateSnapshot() method sets to true; otherwise, it does not change the value of the EnabledManagement property. Enabling management makes possible automatic database snapshot creation and deletion by using a SharePoint timer job based on the settings in the CreationInterval, MaximumRetention, and SnapshotLimit properties. You can set the EnabledManagement property to false after calling the CreateSnapshot() method if you do not want this behavior. You would only have to do this after the first call of the CreateSnapshot() method.