# zrepl main configuration file. For documentation, refer to # https://zrepl.github.io/ and https://github.com/dsh2dsh/zrepl # global: # rpc_timeout: "1m" zfs_bin: "/sbin/zfs" logging: - type: "file" format: "text" # or "json" time: false # don't prepend with date and time hide_fields: &hide-log-fields - "span" # don't log "span" field level: "error" # log errors only # without filename logs to stderr - type: "file" format: "text" hide_fields: *hide-log-fields level: "info" filename: "/var/log/zrepl.log" # Add "jobs:" section(s) here for your specific use cases. jobs: - name: "hourly-snap" type: "snap" filesystems: &filesystems "zroot/ROOT/default<": true "zroot/usr/home<": true snapshotting: type: "periodic" interval: "1h" prefix: "zrepl_hourly_" pruning: &keep-all - name: "daily-snap" type: "snap" filesystems: *filesystems snapshotting: type: "periodic" interval: "1d" prefix: "zrepl_daily_" pruning: *keep-all - name: "monthly-snap" type: "snap" filesystems: *filesystems snapshotting: type: "periodic" interval: "30d" prefix: "zrepl_monthly_" pruning: *keep-all - name: "zdisk" type: "sink" root_fs: "zdisk/zrepl" serve: type: "local" listener_name: "zdisk" recv: placeholder: encryption: "inherit" monitor: &monitor-snapshots count: - prefix: "zrepl_frequently_" warning: 18 critical: 30 - prefix: "zrepl_hourly_" warning: 32 critical: 50 - prefix: "zrepl_daily_" warning: 92 critical: 100 - prefix: "zrepl_monthly_" warning: 14 critical: 15 - prefix: "" # everything else warning: 2 critical: 10 latest: - prefix: "zrepl_frequently_" critical: "48h" # 2d - prefix: "zrepl_hourly_" critical: "48h" - prefix: "zrepl_daily_" critical: "48h" - prefix: "zrepl_monthly_" critical: "768h" # 32d oldest: # see zroot-to-zdisk prunner.keep_receiver - prefix: "zrepl_frequently_" critical: "48h" # 2d - prefix: "zrepl_hourly_" critical: "168h" # 7d - prefix: "zrepl_daily_" critical: "2208h" # 90d + 2d - prefix: "zrepl_monthly_" critical: "8688h" # 30 * 12 = 360d + 2d - prefix: "" # everything else critical: "168h" # 7d - name: "zroot-to-zdisk" type: "push" connect: type: "local" listener_name: "zdisk" client_identity: "localhost" filesystems: *filesystems replication: &replication # Send all intermediary snapshots as a stream package, instead of sending # them one by one. #one_step: true concurrency: size_estimates: 8 conflict_resolution: &conflict_resolution initial_replication: "all" snapshotting: type: "periodic" cron: "*/15 * * * *" prefix: "zrepl_frequently_" pruning: keep_sender: - type: "not_replicated" - type: "last_n" count: 16 regex: "^zrepl_frequently_" - type: "regex" negate: true regex: "^zrepl_" - type: "last_n" count: 8 regex: "^zrepl_hourly_" - type: "last_n" count: 4 regex: "^zrepl_daily_" - type: "last_n" count: 2 regex: "^zrepl_monthly_" keep_receiver: &keep-receiver - type: "last_n" count: 2 regex: "^zrepl_frequently_" - type: "last_n" count: 30 regex: "^zrepl_hourly_" - type: "last_n" count: 90 regex: "^zrepl_daily_" - type: "last_n" count: 12 regex: "^zrepl_monthly_" monitor: *monitor-snapshots