restic: clean up modules
This commit is contained in:
parent
255e8fdf3c
commit
58595866af
2 changed files with 32 additions and 49 deletions
|
|
@ -14,8 +14,6 @@
|
||||||
exec /run/wrappers/bin/restic "$@"
|
exec /run/wrappers/bin/restic "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
initialize = true;
|
|
||||||
repository = "rest:https://restic.taild5f7e6.ts.net/gutterman/gameservers";
|
|
||||||
environmentFile = config.sops.secrets."restic/rest-auth.env".path;
|
environmentFile = config.sops.secrets."restic/rest-auth.env".path;
|
||||||
passwordFile = config.sops.secrets."restic/password".path;
|
passwordFile = config.sops.secrets."restic/password".path;
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
|
|
@ -23,6 +21,9 @@
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
repository = "rest:https://restic.taild5f7e6.ts.net/gutterman/gameservers";
|
||||||
|
initialize = true;
|
||||||
|
|
||||||
paths = [
|
paths = [
|
||||||
"/var/lib/minecraft"
|
"/var/lib/minecraft"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -44,57 +44,39 @@
|
||||||
restic-backups-main.serviceConfig.Type = "oneshot";
|
restic-backups-main.serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.restic.backups = {
|
services.restic.backups.main = {
|
||||||
main = {
|
user = "restic-backup";
|
||||||
user = "restic-backup";
|
package = pkgs.writeShellScriptBin "restic" ''
|
||||||
package = pkgs.writeShellScriptBin "restic" ''
|
exec /run/wrappers/bin/restic "$@"
|
||||||
exec /run/wrappers/bin/restic "$@"
|
'';
|
||||||
'';
|
|
||||||
|
|
||||||
initialize = true;
|
environmentFile = config.sops.secrets."restic/rest-auth.env".path;
|
||||||
repository = "rest:http://localhost:8001/drone";
|
passwordFile = config.sops.secrets."restic/password".path;
|
||||||
environmentFile = config.sops.secrets."restic/rest-auth.env".path;
|
timerConfig = {
|
||||||
passwordFile = config.sops.secrets."restic/password".path;
|
OnCalendar = "03:00";
|
||||||
timerConfig = {
|
Persistent = true;
|
||||||
OnCalendar = "03:00";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
paths = [
|
|
||||||
"/var/lib/jellyfin"
|
|
||||||
"/var/lib/vaultwarden"
|
|
||||||
"/var/backups/db-backup"
|
|
||||||
];
|
|
||||||
|
|
||||||
# exclude databases since they are covered separately
|
|
||||||
exclude = [
|
|
||||||
"/var/lib/**/*.db"
|
|
||||||
"/var/lib/**/*.db-shm"
|
|
||||||
"/var/lib/**/*.db-wal"
|
|
||||||
"/var/lib/**/*.sqlite3"
|
|
||||||
"/var/lib/**/*.sqlite3-shm"
|
|
||||||
"/var/lib/**/*.sqlite3-wal"
|
|
||||||
|
|
||||||
"/var/lib/vaultwarden/sends/*"
|
|
||||||
"/var/lib/vaultwarden/tmp/*"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# offsite = {
|
repository = "rest:http://localhost:8001/drone";
|
||||||
# initialize = true;
|
initialize = true;
|
||||||
# repository = "rclone:protondrive:restic";
|
|
||||||
# passwordFile = config.sops.secrets."restic/password".path;
|
|
||||||
# timerConfig = {
|
|
||||||
# OnCalendar = "3:05";
|
|
||||||
# Persistent = true;
|
|
||||||
# };
|
|
||||||
# rcloneOptions = { protondrive-replace-existing-draft = true; };
|
|
||||||
# rcloneConfigFile = config.sops.secrets."restic/rclone/offsite".path;
|
|
||||||
|
|
||||||
# paths = config.services.restic.backups.main.paths;
|
paths = [
|
||||||
# exclude = config.services.restic.backups.main.exclude;
|
"/var/lib/jellyfin"
|
||||||
|
"/var/lib/vaultwarden"
|
||||||
|
"/var/backups/db-backup"
|
||||||
|
];
|
||||||
|
|
||||||
# backupCleanupCommand = "rm -r /var/backups/db-backup/*";
|
# exclude databases since they are covered separately
|
||||||
# };
|
exclude = [
|
||||||
|
"/var/lib/**/*.db"
|
||||||
|
"/var/lib/**/*.db-shm"
|
||||||
|
"/var/lib/**/*.db-wal"
|
||||||
|
"/var/lib/**/*.sqlite3"
|
||||||
|
"/var/lib/**/*.sqlite3-shm"
|
||||||
|
"/var/lib/**/*.sqlite3-wal"
|
||||||
|
|
||||||
|
"/var/lib/vaultwarden/sends/*"
|
||||||
|
"/var/lib/vaultwarden/tmp/*"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue