Skip to content

Commit

Permalink
zfs send -w is default now
Browse files Browse the repository at this point in the history
Example how to change it back:

``` yaml
send:
  raw: false
```
  • Loading branch information
dsh2dsh committed Sep 18, 2024
1 parent 649c913 commit b2380d5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ pkg install zrepl-dsh2dsh

* Redesigned `zrepl status`

* `zfs send -w` is default now. Example how to change it back:

``` yaml
send:
raw: false
```

* Small cosmetic changes

## Upstream user documentation
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ type SnapJob struct {

type SendOptions struct {
Encrypted bool `yaml:"encrypted"`
Raw bool `yaml:"raw"`
Raw bool `yaml:"raw" default:"true"`
SendProperties bool `yaml:"send_properties"`
BackupProperties bool `yaml:"backup_properties"`
LargeBlocks bool `yaml:"large_blocks"`
Expand Down
26 changes: 26 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,29 @@ jobs:
require.NotNil(t, snap)
assert.True(t, snap.TimestampLocal)
}

func TestSendOptions_Raw_defaultTrue(t *testing.T) {
c := testValidConfig(t, `
jobs:
- name: "foo"
type: "push"
connect:
type: "local"
listener_name: "foo"
client_identity: "bar"
filesystems:
"<": true
snapshotting:
type: "periodic"
prefix: "zrepl_"
pruning:
keep_sender:
- type: "not_replicated"
`)

require.NotEmpty(t, c.Jobs)
require.IsType(t, new(PushJob), c.Jobs[0].Ret)
job := c.Jobs[0].Ret.(*PushJob)
require.NotNil(t, job)
assert.True(t, job.Send.Raw)
}

0 comments on commit b2380d5

Please sign in to comment.