Lightweight 0.20260617.0
Loading...
Searching...
No Matches
Lightweight::SqlBackup::BackupSettings Struct Reference

Configuration for backup operations including compression and chunking. More...

#include <SqlBackup.hpp>

Public Attributes

CompressionMethod method = CompressionMethod::Deflate
 The compression method to use.
 
std::uint32_t level = 6
 
std::size_t chunkSizeBytes = 10 * 1024 * 1024
 
std::size_t rowsPerChunk = 100'000
 
std::size_t workerArchiveBytes = 256ULL * 1024 * 1024
 
bool schemaOnly = false
 If true, only export schema metadata without backing up table data.
 
bool forceMssqlConcurrency = false
 

Detailed Description

Configuration for backup operations including compression and chunking.

Definition at line 37 of file SqlBackup.hpp.

Member Data Documentation

◆ method

CompressionMethod Lightweight::SqlBackup::BackupSettings::method = CompressionMethod::Deflate

The compression method to use.

Definition at line 40 of file SqlBackup.hpp.

◆ level

std::uint32_t Lightweight::SqlBackup::BackupSettings::level = 6

The compression level (0-9).

  • For Deflate: 1 = fastest, 9 = best compression, 6 = default
  • For Bzip2: 1-9 (block size in 100k units)
  • For Zstd: maps to zstd levels
  • For Store: ignored

Definition at line 47 of file SqlBackup.hpp.

◆ chunkSizeBytes

std::size_t Lightweight::SqlBackup::BackupSettings::chunkSizeBytes = 10 * 1024 * 1024

The target size in bytes for each chunk before flushing. Chunks are flushed when the buffer exceeds this size. Default: 10 MB.

Definition at line 52 of file SqlBackup.hpp.

◆ rowsPerChunk

std::size_t Lightweight::SqlBackup::BackupSettings::rowsPerChunk = 100'000

Target rows per chunk window. Tables with a single numeric primary key are split into windows of about this many keys (subject to a per-table window cap) that are backed up in parallel by multiple workers.

Definition at line 57 of file SqlBackup.hpp.

◆ workerArchiveBytes

std::size_t Lightweight::SqlBackup::BackupSettings::workerArchiveBytes = 256ULL * 1024 * 1024

Uncompressed bytes each worker accumulates in its private temp archive before sealing it (the compression of that archive runs in the worker thread at that point, overlapped with the network-bound fetch). Bounds worker memory at about jobs x workerArchiveBytes and determines how many temp archives the finalize merge opens. Default: 256 MB.

Definition at line 63 of file SqlBackup.hpp.

◆ schemaOnly

bool Lightweight::SqlBackup::BackupSettings::schemaOnly = false

If true, only export schema metadata without backing up table data.

Definition at line 66 of file SqlBackup.hpp.

◆ forceMssqlConcurrency

bool Lightweight::SqlBackup::BackupSettings::forceMssqlConcurrency = false

Deprecated no-op. Previously bypassed the MS SQL Server single-worker clamp; that clamp has been removed (all databases now back up multi-threaded), so this flag no longer has any effect. Retained temporarily to avoid an API/ABI break; pending removal.

Definition at line 71 of file SqlBackup.hpp.


The documentation for this struct was generated from the following file: