nix-git/hosts/yodaHedgehog/btrbk-config.nix

56 lines
1.7 KiB
Nix
Raw Normal View History

2023-11-20 13:32:26 +01:00
# Dry run:
# sudo btrbk -c /etc/btrbk/remote-backup-ssd.conf run -n
# sudo btrbk -c /etc/btrbk/remote-backup-hdd.conf run -n
# Initial backup:
# sudo btrbk -c /etc/btrbk/remote-backup-ssd.conf run; echo "Subject: btrbk has finished" | sendmail -f langbein@mail.de daniel@systemli.org
# sudo btrbk -c /etc/btrbk/remote-backup-hdd.conf run; echo "Subject: btrbk has finished" | sendmail -f langbein@mail.de daniel@systemli.org
2023-11-18 12:02:52 +01:00
{ config, pkgs, ... }:
let
# TODO: Remove duplicate variables below (reuse from yodaNas config).
ssd-subvolumes = {
"arch.p1st.de" = {};
"blogger.privacy1st.de" = {};
"changedetection.p1st.de" = {};
"cloud.privacy1st.de" = {};
2024-01-08 18:35:34 +01:00
"cloud.fykml.de" = {};
2023-11-18 12:02:52 +01:00
"git.privacy1st.de" = {};
"mastodon-toot-follower.privacy1st.de" = {};
"money.p1st.de" = {};
"music.privacy1st.de" = {};
"paste.p1st.de" = {};
"proxy" = {};
"recipe.privacy1st.de" = {};
"traggo.privacy1st.de" = {};
};
hdd-subvolumes = {
"cloud.privacy1st.de" = {};
2023-11-22 17:42:08 +01:00
"cloud.fykml.de" = {};
2023-11-18 12:02:52 +01:00
};
in
{
# TODO: Enable lz4 when yodaHedgehog no longer has direct LAN connection.
yoda.btrbkBackups = [
{
instance = "remote-backup-ssd";
2023-11-18 12:16:47 +01:00
enable = false;
2023-11-18 12:02:52 +01:00
lz4 = false;
2023-11-18 13:01:18 +01:00
ssh_identity = "/root/.ssh/rootNas_ed25519";
volume = "ssh://rootNas/jc-data";
2023-11-18 12:02:52 +01:00
snapshot_dir = "/snap";
target = "/mnt/backup/snap";
subvolume = ssd-subvolumes;
}
{
instance = "remote-backup-hdd";
2023-11-18 12:16:47 +01:00
enable = false;
2023-11-18 12:02:52 +01:00
lz4 = false;
2023-11-18 13:01:18 +01:00
ssh_identity = "/root/.ssh/rootNas_ed25519";
volume = "ssh://rootNas/mnt/data/jc-data";
2023-11-18 12:02:52 +01:00
snapshot_dir = "/mnt/data/snap2";
target = "/mnt/backup/snap2";
subvolume = hdd-subvolumes;
}
];
}