Configuration parameters

General Parameters

Parameter Type Default Value Usage / Description Possible Values
LogLevel string β€œinfo” Logging verbosity. Controls log output level. debug, info, warn, error
IndexCacheDir string β€œ$CONFIG_DIR/index_cache” Directory for storing index cache files. Any valid path
TmpFileLocation string OS temp dir Directory for temporary files. Any valid path
TmpFileThreshold int64 10485760 (10 MB) Threshold (in bytes) for using temp files. Any positive integer
BlockFileThreshold int64 4194304 (4 MB) Threshold (in bytes) for splitting files into blocks. Any positive integer
EncryptionKeyFile string β€œ$CONFIG_DIR/.encryption_key” Path to file containing the encryption key. Any valid path
EncryptionKey string β€œβ€ The encryption key itself (read from file). Any string
EnableCompression bool true Enable ZSTD compression for uploads/downloads. true, false
EnableMD5Checksum bool false Enable MD5 checksum calculation for files. true, false
ConcurrentWorkers int 10 Number of concurrent workers for backup/restore operations. Any positive integer
ManageCrontabs bool true Allow Snaper to manage system crontabs for scheduled backups. true, false
SortChunkSize int 100000 (~512MB) Controls the chunk size for external merge sort. This limits the maximum memory used during the sorting phase of index creation. Any positive integer
StreamBufferSize int 1000 (~4MB) Controls the size of the write buffer for the streaming indexer. Any positive integer

S3 Parameters

Parameter Type Default Value Usage / Description Possible Values
Bucket string β€œβ€ S3 bucket name. Can be set via env DATASHELTER_BUCKET Any string
AccessKey string β€œβ€ S3 access key. Can be set via env AWS_ACCESS_KEY_ID. Any string
SecretKey string β€œβ€ S3 secret key. Can be set via env AWS_SECRET_ACCESS_KEY. Any string
Endpoint string β€œhttps://s3.datashelter.cloud” S3 endpoint URL. Used for custom S3 providers (e.g., Scaleway). Any valid URL
Region string β€œeu-west-1” S3 region. Can be set via env AWS_REGION. eu-west-1
DisableSSL bool false Disable SSL for S3 connections (set true if endpoint is http). true, false
StorageClass string β€œSTANDARD” S3 storage class for uploaded objects. STANDARD, STANDARD_IA, ONEZONE_IA
MaxRetries int 10 Maximum number of retries for S3 operations. Any positive integer
MultipartPartSize string β€œ5GB” Part size for S3 multipart uploads (e.g., β€œ5GB” or β€œ100MB”). Any valid size string (e.g., 100MB, 5GB)
MultipartConcurrency int 5 Number of concurrent parts for S3 multipart uploads. Any positive integer

Backups.Files (FileBackup)

Parameter Type Default Usage / Description Possible Values
Name string β€œβ€ Name of the backup set. Used to reference the backup. Any string
IncludedPaths []string [] List of paths to include in the backup. Any valid paths
ExcludedPaths []string [] List of paths to exclude from the backup. Any valid paths
FollowSymlinks bool false Whether to follow symlinks during backup. true, false
SkipIntegrityCheck bool false Skip integrity check for this backup set. true, false

Backups.Databases (DatabaseBackup)

Parameter Type Default Usage / Description Possible Values
Name string β€œβ€ Name of the database backup. Any string
Type string β€œβ€ Database type (e.g., mysql, postgres). mysql, postgres, …
DBLaunchOpts []string [] Additional options for launching the database backup command. Any string array

Notes

  • Environment Variable Overrides:
    Some S3 config parameters (AccessKey, SecretKey, Bucket, Region) can be overridden by environment variables.
  • Config File Location:
    The config file is typically located in ~/.config/snaper/config.yaml.
  • Encryption:
    If encryption is enabled, the key is stored in a file and referenced by EncryptionKeyFile.
  • Backups Section:
    The Backups section is a list of backup sets (files and databases), each with its own parameters.