From cb64b108b29aad0b0d9994fd88ea7f29742fccf7 Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Sat, 17 Jun 2023 07:32:00 +0200 Subject: [PATCH] Make backups only include /home --- secret/backblaze.age | Bin 636 -> 727 bytes shared/core/backups.nix | 13 ++++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/secret/backblaze.age b/secret/backblaze.age index 7a0e0396573bd46e7e231f4b664d8cd81c202a36..a97ce5be624b56eb2888f1d1df0c8fc730440a84 100644 GIT binary patch delta 675 zcmWm9%WKnc003Yo4kYNsgGE7?gJVioo20Kq#nH#wCTW|dX_6-3SlXmn+oWmp>mwc0 zA_zOEFxgFqUIlSp1QpSX4i)CXDTs%8P!M$tafrfH5WoN6`?Krq@WS{Yh{!3rA@tBD z5&=p#q|p5o&wzr>*6oJrqx02fK(xv#k|ZFNYlI}y5NyCC+@fXZR1(oz>2QfBgfPbT zeEy6QYQ}v{HUfE1!vM^9bqx;&F%oW>#Z19~<*re53X_#Ug5qnq%d&}?wy3Aev}}f* zc7}3_h?#Dsv(a?E42Ar0%t3340327W21E+<<7A46u#DR^l6pSaFUiRsuLBaj^4&Aw z_yp1E*-V*8Nse2~xfxE4^;{%3Q=-v?6rXj;SXJdxzE~Mj#2Oow7$1eT8z2_2*a{+P zJ~PCkY7Aj&bY4%oRTATItNed5Yq8T_!_ifs!&CGGYaE9WV(d&>JO-PvWLr3dfB~TR z2$L7GU7tu>X0DphIt|XUa7VTgOo>#Ab`y}UE^>Y_Gg--I>h5f@B*dk*iVA@?gh@eA z&RZ3~ zuh$DV%$8C}rNc&1>Hv)B!~{*uxLHC(<$A$JN_sEX&!=ncP$d9S=J}Vc`P&!whE8$&hvyLW#K=zV$-MJ?d3+e(km2kD&$Tsq{V#GC9US^PM&9}vRfMgJAI8^S zuU))`#{koqLw}c3^RPtO<=CnVNh0`2I3}6Q_Q77GC`W$e{A0 delta 583 zcmWm9OKZ~r003Y_Wg5Lqro)SbF)zlrrcKht=`d-UN7Hsm+oVa0hb~R?Sk_0nrcH&F z74)KqITbv3(UYi5FM|o*>_vA`5M+ANiwDPWGSJCD@%sng$HV)Fme2Pf7R46ww&D6# zH<^V{A#V}BP>WV&S1rg`Jw~W9mw;S8X99N6t$HRRi)4r<=Q3j8R5Z_6Nbv>}3C}== zgGyvZ=4n+-0q``~Y+A5U4r3TXfDKno3X)DPT>vBZ3$q_c_)L|jI3?2ry-&;wvwV%h24LO@8~rfcx5m QzCWEA>)%~OHwVJXKeM3JZ~y=R diff --git a/shared/core/backups.nix b/shared/core/backups.nix index f6b2480..fe413c3 100644 --- a/shared/core/backups.nix +++ b/shared/core/backups.nix @@ -15,19 +15,22 @@ in with lib; { services.duplicity = { enable = true; secretFile = config.age.secrets."backblaze".path; - include = [ - "/home" - ]; + frequency = null; # We set this later + root = "/home"; + fullIfOlderThan = "1M"; exclude = [ "/home/**/.config" "/home/**/.cache" "/home/**/.cargo" - "/home/**/.local" # NixOS configuration, we keep that elsewhere. "/home/**/os" ]; targetUrl = "b2://005c7170636d5ef0000000001@${cfg.bucket}"; }; + systemd.services.duplicity.wants = ["network.target"]; + systemd.timers.duplicity.timerConfig."OnBootSec" = "20m"; + systemd.timers.duplicity.timerConfig."OnCalendar" = "daily"; + systemd.timers.duplicity.timerConfig."Persistent" = true; }; -} \ No newline at end of file +}