Skip to content

Syncoid

services.syncoid.commands

Syncoid commands to run. Type: attribute set of (submodule)

Default

{ }

Example

{"pool/test".target = "root@target:pool/test";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.extraArgs

Extra syncoid arguments for this command. Type: list of string

Default

[ ]

Example

["--sshport 2222"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.localSourceAllow

Permissions granted for the {option}services.syncoid.user user for local source datasets. See https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html for available permissions. Defaults to {option}services.syncoid.localSourceAllow option.

Type: list of string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.localTargetAllow

Permissions granted for the {option}services.syncoid.user user for local target datasets. See https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html for available permissions. Make sure to include the change-key permission if you send raw encrypted datasets, the compression permission if you send raw compressed datasets, and so on. For remote target datasets you'll have to set your remote user permissions by yourself.

Type: list of string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.recursive

Whether to enable the transfer of child datasets. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.recvOptions

Advanced options to pass to zfs recv. Options are specified without their leading dashes and separated by spaces.

Type: strings concatenated with " "

Default

""

Example

"ux recordsize o compression=lz4"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.sendOptions

Advanced options to pass to zfs send. Options are specified without their leading dashes and separated by spaces.

Type: strings concatenated with " "

Default

""

Example

"Lc e"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.service

Systemd configuration specific to this syncoid service.

Type: attribute set

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.source

Source ZFS dataset. Can be either local or remote. Defaults to the attribute name.

Type: string

Example

"pool/dataset"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.sshKey

SSH private key file to use to login to the remote system. Defaults to {option}services.syncoid.sshKey option.

Type: null or (string or path convertible to it)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.target

Target ZFS dataset. Can be either local («pool/dataset») or remote («user@server:pool/dataset»).

Type: string

Example

"user@server:pool/dataset"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commands.<name>.useCommonArgs

Whether to add the configured common arguments to this command.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.commonArgs

Arguments to add to every syncoid command, unless disabled for that command. See https://github.com/jimsalterjrs/sanoid/#syncoid-command-line-options for available options.

Type: list of string

Default

[ ]

Example

["--no-sync-snap"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.enable

Whether to enable Syncoid ZFS synchronization service. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.group

The group for the service. Type: string

Default

"syncoid"

Example

"backup"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.interval

Run syncoid at this interval. The default is to run hourly.

The format is described in {manpage}systemd.time(7).

Type: string

Default

"hourly"

Example

"*-*-* *:15:00"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.localSourceAllow

Permissions granted for the {option}services.syncoid.user user for local source datasets. See https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html for available permissions.

Type: list of string

Default

["bookmark""hold""send""snapshot""destroy""mount"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.localTargetAllow

Permissions granted for the {option}services.syncoid.user user for local target datasets. See https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html for available permissions. Make sure to include the change-key permission if you send raw encrypted datasets, the compression permission if you send raw compressed datasets, and so on. For remote target datasets you'll have to set your remote user permissions by yourself.

Type: list of string

Default

["change-key""compression""create""mount""mountpoint""receive""rollback"]

Example

["create""mount""receive""rollback"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.package

The sanoid package to use. Type: package

Default

pkgs.sanoid

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.service

Systemd configuration common to all syncoid services.

Type: attribute set

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.sshKey

SSH private key file to use to login to the remote system. Can be overridden in individual commands.

Type: null or (string or path convertible to it)

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix

services.syncoid.user

The user for the service. ZFS privilege delegation will be automatically configured for any local pools used by syncoid if this option is set to a user other than root. The user will be given the "hold" and "send" privileges on any pool that has datasets being sent and the "create", "mount", "receive", and "rollback" privileges on any pool that has datasets being received.

Type: string

Default

"syncoid"

Example

"backup"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/backup/syncoid.nix