Skip to content

Per-database snapshot and retention settings #1174

@moll

Description

@moll

Hey,

Thanks for maintaining Litestream!

Have you considered per-database custom snapshot and retention settings? I realize one could just run different instances of Litestream, but right now Litestream sits between the space of assuming one instance running (with reliance on a global /etc/litestream.yml config and defaulting to /var/run/litestream.sock) and multiple instances (due to some configuration parameters being only global).

At least reading today's main's config parsing, I don't see any per-database snapshot settings:

type DBConfig struct {
Path string `yaml:"path"`
Dir string `yaml:"dir"` // Directory to scan for databases
Pattern string `yaml:"pattern"` // File pattern to match (e.g., "*.db", "*.sqlite")
Recursive bool `yaml:"recursive"` // Scan subdirectories recursively
Watch bool `yaml:"watch"` // Enable directory monitoring for changes
MetaPath *string `yaml:"meta-path"`
MonitorInterval *time.Duration `yaml:"monitor-interval"`
CheckpointInterval *time.Duration `yaml:"checkpoint-interval"`
BusyTimeout *time.Duration `yaml:"busy-timeout"`
MinCheckpointPageN *int `yaml:"min-checkpoint-page-count"`
TruncatePageN *int `yaml:"truncate-page-n"`
RestoreIfDBNotExists bool `yaml:"restore-if-db-not-exists"`
Replica *ReplicaConfig `yaml:"replica"`
Replicas []*ReplicaConfig `yaml:"replicas"` // Deprecated
}

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions