@cryptotaxi247 / infra-1 / commits / 9bf699dc

haumea: restore backups

Backups to rsync.net stopped working on Jan 10th, when haumea stopped being able to connect to the sync. Then on Jan 13th it was able to connect to the sync again, but incompatibilities in the zrepl versions on both sides made it impossible to send backups. We unfortunately don't control the rsync.net account, so for now drop it in favor of a backup on one of my personal hosts. Not meant to be a long term solution (famous last words).

Pierre Bourdon committed Feb 12, 2024 at 02:48 UTC 9bf699dcacb19892ffbd91e2aa18f672c6e88b5e
1 file changed +58 -41
delft/haumea.nix
+58 -41
@@ -164,7 +164,45 @@
164
165 services.zfs.autoScrub.enable = true;
166
167 - services.zrepl = {
167 + services.zrepl = let
168 + defaultBackupJob = {
169 + type = "push";
170 + filesystems."rpool/safe<" = true;
171 + snapshotting = {
172 + type = "periodic";
173 + interval = "5m";
174 + prefix = "zrepl_snap_";
175 + };
176 + pruning = {
177 + keep_sender = [
178 + {
179 + type = "grid";
180 + regex = "^zrepl_snap_.*";
181 + grid = lib.concatStringsSep " | " [
182 + "3x5m"
183 + "4x15m"
184 + "24x1h"
185 + "4x1d"
186 + "3x1w"
187 + ];
188 + }
189 + ];
190 + keep_receiver = [
191 + { type = "grid";
192 + regex = "^zrepl_snap_.*";
193 + grid = lib.concatStringsSep " | " [
194 + "20x5m"
195 + "96x1h"
196 + "12x4h"
197 + "7x1d"
198 + "52x1w"
199 + "120x3w"
200 + ];
201 + }
202 + ];
203 + };
204 + };
205 + in {
206 enable = true;
207 settings = {
208 global = {
@@ -178,51 +216,30 @@
216 };
217
218 jobs = [
181 - {
182 - name = "rsyncnet";
183 - type = "push";
184 - filesystems."rpool/safe<" = true;
185 - snapshotting = {
186 - type = "periodic";
187 - interval = "5m";
188 - prefix = "zrepl_snap_";
189 - };
219 + # XXX: Broken since 2024-01-10?
220 + # (defaultBackupJob // {
221 + # name = "rsyncnet";
222 + # connect = {
223 + # identity_file = "/root/.ssh/id_ed25519";
224 + # type = "ssh+stdinserver";
225 + # host = "zh2543b.rsync.net";
226 + # user = "root";
227 + # port = 22;
228 + # };
229 + # })
230 +
231 + (defaultBackupJob // {
232 + name = "delroth";
233 connect = {
234 identity_file = "/root/.ssh/id_ed25519";
235 type = "ssh+stdinserver";
193 - host = "zh2543b.rsync.net";
194 - user = "root";
236 + host = "smol.delroth.net";
237 + user = "zrepl";
238 port = 22;
239 };
197 - pruning = {
198 - keep_sender = [
199 - {
200 - type = "grid";
201 - regex = "^zrepl_snap_.*";
202 - grid = lib.concatStringsSep " | " [
203 - "3x5m"
204 - "4x15m"
205 - "24x1h"
206 - "4x1d"
207 - "3x1w"
208 - ];
209 - }
210 - ];
211 - keep_receiver = [
212 - { type = "grid";
213 - regex = "^zrepl_snap_.*";
214 - grid = lib.concatStringsSep " | " [
215 - "20x5m"
216 - "96x1h"
217 - "12x4h"
218 - "7x1d"
219 - "52x1w"
220 - "120x3w"
221 - ];
222 - }
223 - ];
224 - };
225 - }
240 + })
241 +
242 + # XXX: Seems to be broken as of 2024-02-12 (permission denied).
243 {
244 # run with `zrepl signal wakeup safe_ma27` after
245 # snapshots were done from safe.