Skip to content

localbackup

Automatically backups current machine to local directory.

Categories

Uncategorized

Usage via Inventory

This module cannot be used via the inventory interface.

Usage via Nix

This module can be also imported directly in your nixos configuration. Although it is recommended to use the inventory interface if available.

Some modules are considered 'low-level' or 'expert modules' and are not available via the inventory interface.

{config, lib, inputs, ...}: {
    imports = [ inputs.clan-core.clanModules.localbackup ];
    # ...
}

Module Options

The following options are available for this module.

clan.localbackup.snapshots

Number of snapshots to keep

Type: signed integer

Default:

20

localbackup

clan.localbackup.targets

List of directories where backups are stored

Type: attribute set of (submodule)

Default:

{ }

localbackup

clan.localbackup.targets.<name>.directory

the directory to backup

Type: string

localbackup

clan.localbackup.targets.<name>.mountpoint

mountpoint of the directory to backup. If set, the directory will be mounted before the backup and unmounted afterwards

Type: null or string

Default:

null

localbackup

clan.localbackup.targets.<name>.name

the name of the backup job

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

Default:

"‹name›"

localbackup

clan.localbackup.targets.<name>.postBackupHook

Shell commands to run after the backup

Type: null or strings concatenated with "\n"

Default:

null

localbackup

clan.localbackup.targets.<name>.postMountHook

Shell commands to run after the directory is mounted

Type: null or strings concatenated with "\n"

Default:

null

localbackup

clan.localbackup.targets.<name>.postUnmountHook

Shell commands to run after the directory is unmounted

Type: null or strings concatenated with "\n"

Default:

null

localbackup

clan.localbackup.targets.<name>.preBackupHook

Shell commands to run before the backup

Type: null or strings concatenated with "\n"

Default:

null

localbackup

clan.localbackup.targets.<name>.preMountHook

Shell commands to run before the directory is mounted

Type: null or strings concatenated with "\n"

Default:

null

localbackup

clan.localbackup.targets.<name>.preUnmountHook

Shell commands to run before the directory is unmounted

Type: null or strings concatenated with "\n"

Default:

null

localbackup