Skip to content

state

clan.core.state.<name>.folders

Folder where state resides in

Type: list of string

state.nix

clan.core.state.<name>.name

Name of the state

Type: string matching the pattern ^[a-zA-Z0-9_-]+$

Default:

"‹name›"

state.nix

clan.core.state.<name>.postRestoreCommand

Readonly

This command is called after a restore of the state dir from a backup.

It contains the content of postRestoreScript.

Type: null or string

Default:

null

state.nix

clan.core.state.<name>.postRestoreScript

script to restore the service after the state dir was restored from a backup

Utilize this to start services which were previously stopped

Type: null or strings concatenated with "\n"

Default:

null

state.nix

clan.core.state.<name>.preBackupCommand

Readonly

Use this command in backup providers. It contains the content of preBackupScript.

Type: null or string

Default:

null

state.nix

clan.core.state.<name>.preBackupScript

script to run before backing up the state dir This is for example useful for services that require an export of their state e.g. a database dump

Type: null or strings concatenated with "\n"

Default:

null

state.nix

clan.core.state.<name>.preRestoreCommand

Readonly

This command can be called to restore the state dir from a backup. It contains the content of preRestoreScript.

Type: null or string

Default:

null

state.nix

clan.core.state.<name>.preRestoreScript

script to run before restoring the state dir from a backup

Utilize this to stop services which currently access these folders

Type: null or strings concatenated with "\n"

Default:

null

state.nix