Add backup stuff
This commit is contained in:
parent
d640573b6e
commit
d630ed5a8b
2 changed files with 29 additions and 2 deletions
|
@ -74,4 +74,30 @@ in
|
|||
};
|
||||
};
|
||||
sops.secrets."services/restic/env".owner = "backup";
|
||||
sops.secrets."services/restic/rclone.conf" = {
|
||||
owner = "backup";
|
||||
path = "/backup/.config/rclone/rclone.conf";
|
||||
};
|
||||
systemd.services.backup-rclone = {
|
||||
enable = true;
|
||||
description = "Upload backup to remote";
|
||||
script = ''
|
||||
${pkgs.rclone}/bin/rclone sync /backup backup:backup-darkkirb-de/backup
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = "backup";
|
||||
Group = "backup";
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
systemd.timers.backup-rclone = {
|
||||
enable = true;
|
||||
description = "Upload backup to remote";
|
||||
requires = [ "backup-rclone.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
timerConfig = {
|
||||
onBootSec = 300;
|
||||
onUnitActiveSec = 86400;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ services:
|
|||
chir.rs: ENC[AES256_GCM,data:sQnsfllMKiKJFGmhuaEP4gMpXM0Kx8+xJmrhoBIu1jq5fy7P0Bm/hryskKm98QXRCcK2bRmrdKGZ9XQSDtwSjBW+SX541Abated4ZqS/l5G48sW3QalWIdkYFg0Cc+1Ugn+i1XOjxt+yDS6yXVmAWLon6xYAp0s1G5AUZ5RG3bxMhYaFy9DwWRKkvrQ+/dCieYbtIfm8PXIh99PjdtxQpS1UlfvuqaZWfLYaa/GeeoCrsJfC9uC9rk+9YXMrDDdvQdq3ZFbv1RmoqTWJZWz0UxFvKqOLDF7gAnLG77O2XAWeHxJ/YHNJgGkAgpmssKXw55EM7E9YvFzmODg1PI1L6OXTnU9E86UzdqCTUbxPFcP9ACg51ABZMaRu0Cerz2qwO0CCRVaS6tUDK8zJcxHxlqHW+piZ3rnvWsn/qdacM4d9liheYHZsaOcUEijk+Z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ulz4XcqMSPnFV1tQ86HhuqkpIha8Y=,iv:1zOKftQahI9z3f1G6SFCP4SoqkpUfy9r5ACTiuVEo30=,tag:TLZDJ60jtULx5mPvoSNmLg==,type:str]
|
||||
rclone.conf: ENC[AES256_GCM,data:i/mSpLsFpc4ysoucbER3Ry/Ozix3QgSfBGA5djuzIbLCTFio9qnYo3h8lxC2s3dMpA35piNEzuBOnE3arJZ1JIYe0oSsGtDQMxp4p8FTxC7n64SmsWyqciI2jTdPH2VKs+CZh8mivsUc2+ZQrv4TuA==,iv:d3AcabM58XnbtYcbZkW6F0KW11zUVJuU0Tj8DAdJ4kk=,tag:GchOTbRLmgqLpEIKLatqLw==,type:str]
|
||||
security:
|
||||
restic:
|
||||
password: ENC[AES256_GCM,data:n+M6pfe0YrONaYo3HSnijHxhThg=,iv:0J2t+58tYRJD1GmnJa8w30U+RwOl67eWeHhvLk0eeks=,tag:ivuZqpGrU7ZHFZ4IiMvxBw==,type:str]
|
||||
|
@ -59,8 +60,8 @@ sops:
|
|||
WnV3QWxtalIzWFdoQmpDTmJsNGdNOW8K++rFGXy0G6Gcu2gQwSP6xfXInQ/y5nh5
|
||||
2oGp8sfOLFWnNI4SWL0ChP47K3C/9ysUHwQnUYPbRafZ/4X6cN40ZQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2022-05-06T09:07:37Z"
|
||||
mac: ENC[AES256_GCM,data:VVFnvBybkvrEoMcilL6YW0GjtXXRCk2SK8HXpehRHgXIq0iplNonlLxU9OpunIjGizMBEydn6it82GGDABZ8l8Fzah64xRj+JCCyOo5HPi09o/1WfayECC9EqD6Qbjsb+BVMEWx0bQf5Ox/DXkF/NYhmUqPwFTCfIhDgDUJf8RE=,iv:UdBhrsBIGQRK+6RS8ISz6UOf7P/BplxHCcZRuVUP8pw=,tag:ebhFPqU9sHjoXGiSjo9eOw==,type:str]
|
||||
lastmodified: "2022-05-06T13:43:24Z"
|
||||
mac: ENC[AES256_GCM,data:cOddXdt2JyIk0gMsgoW1OXnyZhTkLtBfo6YZ3v8CU4/cNK0jUFG7zJSz/M/Pkc1gPFsKi///MAXr/AiVw6BPOnLx4q6XoCmH6PHbgHb+AmKOx1G2U2ErxqkowTb7p1dcHA94KtdAmTF0QdLOKPzV8jgzD1nFMObZyFbCh02p2WY=,iv:4ypJqxhA1sCWXpfl6HSH9XA7M5JaF5oA3rHJ+oPFGWY=,tag:ehgm031IG7kd4wFgZOOcEw==,type:str]
|
||||
pgp:
|
||||
- created_at: "2022-04-24T10:34:20Z"
|
||||
enc: |
|
||||
|
|
Loading…
Reference in a new issue