Class BackupEngineOptions
- Namespace
- RocksDbNet
- Assembly
- RocksDb.Net.dll
Options for opening a BackupEngine.
Maps to rocksdb_backup_engine_options_t.
public sealed class BackupEngineOptions : RocksDbHandle, IDisposable
- Inheritance
-
BackupEngineOptions
- Implements
- Inherited Members
Constructors
BackupEngineOptions(string)
Creates options for a backup engine rooted at backupDir.
public BackupEngineOptions(string backupDir)
Parameters
backupDirstring
Properties
BackupDir
The directory backups are written to.
public string BackupDir { get; set; }
Property Value
BackupLogFiles
If true, WAL files are included in the backup.
public bool BackupLogFiles { get; set; }
Property Value
BackupRateLimit
Backup throughput limit in bytes per second. 0 means unlimited.
public ulong BackupRateLimit { get; set; }
Property Value
CallbackTriggerIntervalSize
Bytes copied between invocations of the progress callback set on CreateBackupOptions.
public ulong CallbackTriggerIntervalSize { get; set; }
Property Value
CurrentTemperaturesOverrideManifest
If true, the file temperatures observed at backup time take precedence over the ones recorded in the manifest.
public bool CurrentTemperaturesOverrideManifest { get; set; }
Property Value
DestroyOldData
If true, opening the engine deletes any backups already in the directory.
public bool DestroyOldData { get; set; }
Property Value
IoBufferSize
Size in bytes of the buffer used to copy file contents. 0 lets RocksDb choose.
public ulong IoBufferSize { get; set; }
Property Value
MaxBackgroundOperations
Number of threads used to copy files during a backup or restore.
public int MaxBackgroundOperations { get; set; }
Property Value
RestoreRateLimit
Restore throughput limit in bytes per second. 0 means unlimited.
public ulong RestoreRateLimit { get; set; }
Property Value
SchemaVersion
On-disk schema version for new backups. Newer versions support more features but cannot be read by older RocksDb releases.
public int SchemaVersion { get; set; }
Property Value
ShareFilesWithChecksum
If true, shared files are named and matched by checksum as well as size, which detects a corrupt shared file that happens to be the right length.
public bool ShareFilesWithChecksum { get; set; }
Property Value
ShareFilesWithChecksumNaming
How shared file names encode their checksum. RocksDb does not publish
these values through the C API, so this stays an int.
public int ShareFilesWithChecksumNaming { get; set; }
Property Value
ShareTableFiles
If true, table files are shared between backups instead of copied into each one, which makes incremental backups much cheaper.
public bool ShareTableFiles { get; set; }
Property Value
Sync
If true, each backup is synced to durable storage before it is reported complete.
public bool Sync { get; set; }
Property Value
Methods
DisposeHandle()
Releases the native handle. Called during disposal.
protected override void DisposeHandle()
Remarks
Protected rather than public: it destroys the native object without marking this instance disposed or clearing the handle, so calling it from outside and then disposing normally would free the same pointer twice. It was the most Dispose-looking member on the type. Callers want Dispose().
SetBackupRateLimiter(RateLimiter?)
Throttles backup I/O using a rate limiter object.
public BackupEngineOptions SetBackupRateLimiter(RateLimiter? rateLimiter)
Parameters
rateLimiterRateLimiter
Returns
Remarks
Write-only, since the C API offers no getter. RocksDb copies the shared
pointer rather than taking ownership, so the caller stays responsible for
disposing rateLimiter and must keep it alive while the
engine is in use. Prefer this over BackupRateLimit when the
limiter is shared with other work.
Passing null does nothing rather than removing an existing limiter, because the C API ignores a null argument.
SetEnv(Env?)
Selects the environment the engine reads and writes through.
public BackupEngineOptions SetEnv(Env? env)
Parameters
envEnv
Returns
SetRestoreRateLimiter(RateLimiter?)
Throttles restore I/O using a rate limiter object.
public BackupEngineOptions SetRestoreRateLimiter(RateLimiter? rateLimiter)
Parameters
rateLimiterRateLimiter
Returns
Remarks
Ownership works exactly as for SetBackupRateLimiter(RateLimiter?), and so does the treatment of null: it is ignored, not a way to remove a limiter.