backwards: Backup sync to cloud with restic
This commit is contained in:
@@ -37,12 +37,35 @@ in
|
|||||||
"--keep-yearly 12"
|
"--keep-yearly 12"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"sync-to-cloud" = {
|
||||||
|
initialize = true;
|
||||||
|
|
||||||
|
passwordFile = config.age.secrets.restic-password.path;
|
||||||
|
environmentFile = config.age.secrets.restic-cloud-sync-key.path;
|
||||||
|
repositoryFile = config.age.secrets.restic-cloud-sync-repository.path;
|
||||||
|
|
||||||
|
paths = ["/home/alex/sync"];
|
||||||
|
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*-*-* 0/12:00:00"; # Every 12th hour, i.e. twice a day
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 1"
|
||||||
|
"--keep-weekly 7"
|
||||||
|
"--keep-yearly 12"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
age = {
|
age = {
|
||||||
secrets = {
|
secrets = {
|
||||||
"restic-password".file = ../../../../secrets/backwards/restic-password.age;
|
"restic-password".file = ../../../../secrets/backwards/restic-password.age;
|
||||||
|
"restic-cloud-sync-key".file = ../../../../secrets/backwards/restic-cloud-sync-key.age;
|
||||||
|
"restic-cloud-sync-repository".file = ../../../../secrets/backwards/restic-cloud-sync-repository.age;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user