treewide: snapshot important datasets with sanoid
This commit is contained in:
parent
715b3f799a
commit
345bf13b0d
6 changed files with 55 additions and 0 deletions
|
@ -10,6 +10,7 @@
|
|||
./nginx.nix
|
||||
./nix.nix
|
||||
./openssh.nix
|
||||
./sanoid.nix
|
||||
./security.nix
|
||||
./steam.nix
|
||||
];
|
||||
|
|
35
common/sanoid.nix
Normal file
35
common/sanoid.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
services.sanoid = {
|
||||
enable = true;
|
||||
extraArgs = [ "--verbose" ];
|
||||
|
||||
# Local snapshots for important datasets
|
||||
templates."production" = {
|
||||
yearly = 0;
|
||||
monthly = 3;
|
||||
daily = 30;
|
||||
hourly = 36;
|
||||
autosnap = true;
|
||||
autoprune = true;
|
||||
};
|
||||
|
||||
# Reduced-retention version for datasets that are backed up to the NAS
|
||||
templates."safe" = {
|
||||
yearly = 0;
|
||||
monthly = 0;
|
||||
daily = 7;
|
||||
hourly = 24;
|
||||
autosnap = true;
|
||||
autoprune = true;
|
||||
};
|
||||
|
||||
# datasets."rpool_sggau1/reese/system" = {
|
||||
# useTemplate = [ "safe" ];
|
||||
# recursive = "zfs";
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue