mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
btrbk: option to disable timer
This commit is contained in:
parent
13b7c922e7
commit
f423383ca2
@ -26,6 +26,7 @@ in
|
|||||||
yoda.btrbkBackups = [
|
yoda.btrbkBackups = [
|
||||||
{
|
{
|
||||||
instance = "remote-backup-ssd";
|
instance = "remote-backup-ssd";
|
||||||
|
enable = false;
|
||||||
lz4 = false;
|
lz4 = false;
|
||||||
ssh_identity = "/mnt/backup/rootNas_ed25519";
|
ssh_identity = "/mnt/backup/rootNas_ed25519";
|
||||||
volume = "ssh://rootnas/jc-data";
|
volume = "ssh://rootnas/jc-data";
|
||||||
@ -35,6 +36,7 @@ in
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
instance = "remote-backup-hdd";
|
instance = "remote-backup-hdd";
|
||||||
|
enable = false;
|
||||||
lz4 = false;
|
lz4 = false;
|
||||||
ssh_identity = "/mnt/backup/rootNas_ed25519";
|
ssh_identity = "/mnt/backup/rootNas_ed25519";
|
||||||
volume = "ssh://rootnas/mnt/data/jc-data";
|
volume = "ssh://rootnas/mnt/data/jc-data";
|
||||||
|
@ -13,12 +13,15 @@ in
|
|||||||
type = types.listOf types.attrs;
|
type = types.listOf types.attrs;
|
||||||
default = [];
|
default = [];
|
||||||
example = [{
|
example = [{
|
||||||
|
instance = "local-backup-ssd";
|
||||||
|
# Optional.
|
||||||
|
# Can be used to disable timer.
|
||||||
|
#enable = false;
|
||||||
# Optional.
|
# Optional.
|
||||||
# If this is `true` and `volume` starts with `ssh://`, `lz4` transport compression is enabled.
|
# If this is `true` and `volume` starts with `ssh://`, `lz4` transport compression is enabled.
|
||||||
lz4 = true;
|
lz4 = true;
|
||||||
# Optional.
|
# Optional.
|
||||||
#ssh_identity = /root/.ssh/rootNas_ed25519;
|
#ssh_identity = /root/.ssh/rootNas_ed25519;
|
||||||
instance = "local-backup-ssd";
|
|
||||||
volume = "/jc-data";
|
volume = "/jc-data";
|
||||||
snapshot_dir = "/snap";
|
snapshot_dir = "/snap";
|
||||||
target = "/mnt/backup/snap";
|
target = "/mnt/backup/snap";
|
||||||
@ -47,8 +50,7 @@ in
|
|||||||
# `services.btrbk.instances` template.
|
# `services.btrbk.instances` template.
|
||||||
{
|
{
|
||||||
"${x.instance}" = {
|
"${x.instance}" = {
|
||||||
#onCalendar = null;
|
onCalendar = if (x.enable or true) then "00:05" else null;
|
||||||
onCalendar = "00:05";
|
|
||||||
settings = {
|
settings = {
|
||||||
timestamp_format = "long";
|
timestamp_format = "long";
|
||||||
stream_compress = mkIf ((x.lz4 or false) && strings.hasPrefix "ssh://" x.volume) "lz4";
|
stream_compress = mkIf ((x.lz4 or false) && strings.hasPrefix "ssh://" x.volume) "lz4";
|
||||||
|
@ -14,6 +14,9 @@ in
|
|||||||
default = [];
|
default = [];
|
||||||
example = [{
|
example = [{
|
||||||
instance = "local-snapshot-ssd";
|
instance = "local-snapshot-ssd";
|
||||||
|
# Optional.
|
||||||
|
# Can be used to disable timer.
|
||||||
|
#enable = false;
|
||||||
volume = "/jc-data";
|
volume = "/jc-data";
|
||||||
snapshot_dir = "/snap";
|
snapshot_dir = "/snap";
|
||||||
subvolume = {
|
subvolume = {
|
||||||
@ -41,8 +44,7 @@ in
|
|||||||
# `services.btrbk.instances` template.
|
# `services.btrbk.instances` template.
|
||||||
{
|
{
|
||||||
"${x.instance}" = {
|
"${x.instance}" = {
|
||||||
#onCalendar = null;
|
onCalendar = if (x.enable or true) then "hourly" else null;
|
||||||
onCalendar = "hourly";
|
|
||||||
settings = {
|
settings = {
|
||||||
timestamp_format = "long";
|
timestamp_format = "long";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user