diff --git a/cmd/config_job_source.go b/cmd/config_job_source.go index 7d67522..6628235 100644 --- a/cmd/config_job_source.go +++ b/cmd/config_job_source.go @@ -13,7 +13,7 @@ import ( type SourceJob struct { Name string Serve AuthenticatedChannelListenerFactory - Datasets *DatasetMapFilter + Filesystems *DatasetMapFilter SnapshotPrefix string Interval time.Duration Prune PrunePolicy @@ -24,7 +24,7 @@ func parseSourceJob(c JobParsingContext, name string, i map[string]interface{}) var asMap struct { Serve map[string]interface{} - Datasets map[string]string + Filesystems map[string]string SnapshotPrefix string `mapstructure:"snapshot_prefix"` Interval string Prune map[string]interface{} @@ -42,7 +42,7 @@ func parseSourceJob(c JobParsingContext, name string, i map[string]interface{}) return } - if j.Datasets, err = parseDatasetMapFilter(asMap.Datasets, true); err != nil { + if j.Filesystems, err = parseDatasetMapFilter(asMap.Filesystems, true); err != nil { return } @@ -77,7 +77,7 @@ func (j *SourceJob) JobStart(ctx context.Context) { log := ctx.Value(contextKeyLog).(Logger) defer log.Info("exiting") - a := IntervalAutosnap{DatasetFilter: j.Datasets, Prefix: j.SnapshotPrefix, SnapshotInterval: j.Interval} + a := IntervalAutosnap{DatasetFilter: j.Filesystems, Prefix: j.SnapshotPrefix, SnapshotInterval: j.Interval} p, err := j.Pruner(PrunePolicySideDefault, false) if err != nil { log.WithError(err).Error("error creating pruner") @@ -111,7 +111,7 @@ func (j *SourceJob) Pruner(side PrunePolicySide, dryRun bool) (p Pruner, err err p = Pruner{ time.Now(), dryRun, - j.Datasets, + j.Filesystems, j.SnapshotPrefix, j.Prune, } @@ -158,7 +158,7 @@ outer: } // construct connection handler - handler := NewHandler(log, j.Datasets, &PrefixSnapshotFilter{j.SnapshotPrefix}) + handler := NewHandler(log, j.Filesystems, &PrefixSnapshotFilter{j.SnapshotPrefix}) // handle connection rpcServer := rpc.NewServer(rwc) diff --git a/cmd/sampleconf/pullbackup/productionhost.yml b/cmd/sampleconf/pullbackup/productionhost.yml index 9d232b7..0ec8576 100644 --- a/cmd/sampleconf/pullbackup/productionhost.yml +++ b/cmd/sampleconf/pullbackup/productionhost.yml @@ -28,7 +28,7 @@ jobs: client_identity: fullbackup_prod1 # snapshot these filesystems every 10m with zrepl_ as prefix - datasets: { + filesystems: { "zroot/var/db<": "ok", "zroot/usr/home<": "ok", "zroot/var/tmp": "!", #don't backup /tmp diff --git a/cmd/sampleconf/pushbackup/productionhost.yml b/cmd/sampleconf/pushbackup/productionhost.yml index d38ce53..5b81ecd 100644 --- a/cmd/sampleconf/pushbackup/productionhost.yml +++ b/cmd/sampleconf/pushbackup/productionhost.yml @@ -11,7 +11,7 @@ jobs: identity_file: /root/.ssh/id_ed25519 # snapshot these datsets every 10m with zrepl_ as prefix - datasets: { + filesystems: { "zroot/var/db<": "ok", "zroot/usr/home<": "!", } diff --git a/cmd/sampleconf/random/debugging.yml b/cmd/sampleconf/random/debugging.yml index 4030db8..13fd830 100644 --- a/cmd/sampleconf/random/debugging.yml +++ b/cmd/sampleconf/random/debugging.yml @@ -22,7 +22,7 @@ jobs: serve: type: stdinserver client_identity: debian2 - datasets: { + filesystems: { "pool1/db<": ok } snapshot_prefix: zrepl_ diff --git a/cmd/test.go b/cmd/test.go index 3a46b49..148719b 100644 --- a/cmd/test.go +++ b/cmd/test.go @@ -109,7 +109,7 @@ func doTestDatasetMapFilter(cmd *cobra.Command, args []string) { case *PullJob: mf = j.Mapping case *SourceJob: - mf = j.Datasets + mf = j.Filesystems case *LocalJob: mf = j.Mapping default: diff --git a/docs/content/configuration/map_filter_syntax.md b/docs/content/configuration/map_filter_syntax.md index 5ea7df5..6013dda 100644 --- a/docs/content/configuration/map_filter_syntax.md +++ b/docs/content/configuration/map_filter_syntax.md @@ -94,7 +94,7 @@ jobs: - name: pull_backup type: source ... - datasets: { + filesystems: { "zroot/var/db": "ok", "zroot/usr/home<": "ok", "zroot/usr/home/paranoid": "!", diff --git a/docs/content/tutorial/_index.md b/docs/content/tutorial/_index.md index 7c9076b..7dd6e94 100644 --- a/docs/content/tutorial/_index.md +++ b/docs/content/tutorial/_index.md @@ -102,7 +102,7 @@ jobs: serve: type: stdinserver client_identity: backup-srv.example.com - datasets: { + filesystems: { "zroot/var/db": "ok", "zroot/usr/home<": "ok", "zroot/usr/home/paranoid": "!",