Commands: How to start backup or restore operations?

To start or restore backup use StartBackup or StartRestore operations respectively.

StartBackup

Operation StartBackup(
          string backupLocation, 
          DatabaseDocument databaseDocument, 
          bool incremental, 
          string databaseName);
Parameters
backupLocation string Path to directory where backup will be stored.
databaseDocument DatabaseDocument Database configuration document that will be stored with backup in 'Database.Document' file. Pass null to use the one from <system> database.
WARNING: Database configuration document may contain sensitive data which will be decrypted and stored in backup.
incremental bool Indicates if backup is incremental.
databaseName string Name of a database that will be backed up.

Example

store
	.DatabaseCommands
	.GlobalAdmin
	.StartBackup(
		@"C:\temp\backup\Northwind\",
		new DatabaseDocument(),
		incremental: false,
		databaseName: "Northwind");

StartRestore

Operation StartRestore(DatabaseRestoreRequest restoreRequest);
Parameters
restoreRequest DatabaseRestoreRequest Restore information

Example

store
	.DatabaseCommands
	.GlobalAdmin
	.StartRestore(
		new DatabaseRestoreRequest
			{
				BackupLocation = @"C:\temp\backup\Northwind\",
				DatabaseLocation = @"~\Databases\NewNorthwind\",
				DatabaseName = "NewNorthwind"
			});