mirror of
https://github.com/zrepl/zrepl.git
synced 2025-01-03 04:48:55 +01:00
local job config
This commit is contained in:
parent
48a08e4f4d
commit
5e51595d7f
@ -54,6 +54,14 @@ type SourceJob struct {
|
|||||||
Pruning PruningLocal `yaml:"pruning"`
|
Pruning PruningLocal `yaml:"pruning"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LocalJob struct {
|
||||||
|
Type string `yaml:"type"`
|
||||||
|
Name string `yaml:"name"`
|
||||||
|
Replication LocalReplication `yaml:"replication"`
|
||||||
|
Snapshotting Snapshotting `yaml:"snapshotting"`
|
||||||
|
Pruning PruningSenderReceiver `yaml:"pruning"`
|
||||||
|
}
|
||||||
|
|
||||||
type PushReplication struct {
|
type PushReplication struct {
|
||||||
Connect ConnectEnum `yaml:"connect"`
|
Connect ConnectEnum `yaml:"connect"`
|
||||||
Filesystems map[string]bool `yaml:"filesystems"`
|
Filesystems map[string]bool `yaml:"filesystems"`
|
||||||
@ -69,6 +77,11 @@ type SourceReplication struct {
|
|||||||
Filesystems map[string]bool `yaml:"filesystems"`
|
Filesystems map[string]bool `yaml:"filesystems"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type LocalReplication struct {
|
||||||
|
Filesystems map[string]bool `yaml:"filesystems"`
|
||||||
|
RootDataset string `yaml:"root_dataset"`
|
||||||
|
}
|
||||||
|
|
||||||
type Snapshotting struct {
|
type Snapshotting struct {
|
||||||
SnapshotPrefix string `yaml:"snapshot_prefix"`
|
SnapshotPrefix string `yaml:"snapshot_prefix"`
|
||||||
Interval time.Duration `yaml:"interval"`
|
Interval time.Duration `yaml:"interval"`
|
||||||
@ -220,6 +233,7 @@ func (t *JobEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error) {
|
|||||||
"sink": &SinkJob{},
|
"sink": &SinkJob{},
|
||||||
"pull": &PullJob{},
|
"pull": &PullJob{},
|
||||||
"source": &SourceJob{},
|
"source": &SourceJob{},
|
||||||
|
"local": &LocalJob{},
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
42
cmd/config/samples/local.yml
Normal file
42
cmd/config/samples/local.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
jobs:
|
||||||
|
- name: mirror_local
|
||||||
|
type: local
|
||||||
|
# snapshot the filesystems matched by the left-hand-side of the mapping
|
||||||
|
# every 10m with zrepl_ as prefix
|
||||||
|
replication:
|
||||||
|
filesystems: {
|
||||||
|
"pool1/var/db<": true,
|
||||||
|
"pool1/usr/home<": true,
|
||||||
|
"pool1/usr/home/paranoid": false, #don't backup paranoid user
|
||||||
|
"pool1/poudriere/ports<": false #don't backup the ports trees
|
||||||
|
}
|
||||||
|
# TODO FIXME enforce that the tree under root_dataset and the trees allowed (true) by filesystems are non-overlapping
|
||||||
|
root_dataset: "pool2/backups/pool1"
|
||||||
|
|
||||||
|
snapshotting:
|
||||||
|
snapshot_prefix: zrepl_
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
pruning:
|
||||||
|
keep_sender:
|
||||||
|
- type: not_replicated
|
||||||
|
keep_receiver:
|
||||||
|
- type: grid
|
||||||
|
grid: 1x1h(keep=all) | 24x1h | 35x1d | 6x30d
|
||||||
|
keep_bookmarks: all
|
||||||
|
|
||||||
|
global:
|
||||||
|
logging:
|
||||||
|
- type: "stdout"
|
||||||
|
time: true
|
||||||
|
level: "warn"
|
||||||
|
format: "human"
|
||||||
|
monitoring:
|
||||||
|
- type: "prometheus"
|
||||||
|
listen: ":9091"
|
||||||
|
control:
|
||||||
|
sockpath: /var/run/zrepl/control
|
||||||
|
serve:
|
||||||
|
stdinserver:
|
||||||
|
sockdir: /var/run/zrepl/stdinserver
|
Loading…
Reference in New Issue
Block a user