migrate backups to borgbase
This commit is contained in:
parent
253cdf8ede
commit
2e7fefa7b9
|
@ -0,0 +1,8 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 KTkZog 5sg/hpf/62ScHhTff9oK26rKUHOOIOkaEvz6azRbIFs
|
||||||
|
8YDQXQULAwfzazasdUqr+DhBMm0p4957vywLCmbsPOQ
|
||||||
|
-> ^)fem:-grease ,C tq3PQ#"
|
||||||
|
Dp5AeElkIQ9RTy0qPV91kur2jWvk2uJTgSRqk1gwoM8vUJM/BbpdqsimUCI0PFxG
|
||||||
|
Dd507GmCEWDrmovhpAIBS1lAqlY
|
||||||
|
--- +Xft4rCt53z0qwZsydGBaUanbAxv06yRHgJeDw6yUAI
|
||||||
|
<ÀBÝ98Ê@_ä—h8c>›$KãÇ‚K@<žaÿF(ñؾ¼<C2BE>áÉìÍæ=¬µeù-;ÀÒL˯¹R—=;M·È83Õ>öjø]lµf§¸ãÞÌNV*ƨjmôÛCm ÿ"Þ<>¦¾DêønTwõÜŸ[Ðÿ‡‚
|
|
@ -3,9 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
hostname = config.networking.hostName;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
# Our ephemeral system. Wipe root on reboot.
|
# Our ephemeral system. Wipe root on reboot.
|
||||||
../common/optional/ephemeral-btrfs.nix
|
../common/optional/ephemeral-btrfs.nix
|
||||||
|
@ -71,12 +69,6 @@ in {
|
||||||
options = ["subvol=services" "compress=zstd"];
|
options = ["subvol=services" "compress=zstd"];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/srv/backup" = {
|
|
||||||
device = "/dev/disk/by-label/data";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = ["subvol=backup" "compress=zstd"];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/srv/shares" = {
|
fileSystems."/srv/shares" = {
|
||||||
device = "/dev/disk/by-label/data";
|
device = "/dev/disk/by-label/data";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
{...}: {
|
{config, ...}: {
|
||||||
services.borgbackup.jobs = {
|
age.secrets.borgbackup = {
|
||||||
containers = {
|
rekeyFile = ./passphrase.age;
|
||||||
paths = [
|
};
|
||||||
"/srv/containers"
|
|
||||||
];
|
|
||||||
encryption.mode = "none";
|
|
||||||
repo = "/srv/backup/containers";
|
|
||||||
compression = "auto,zstd";
|
|
||||||
startAt = "daily";
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services.borgbackup.jobs."borgbase" = {
|
||||||
paths = [
|
paths = [
|
||||||
"/srv/services"
|
# Shares
|
||||||
];
|
"/srv/shares/sajenim"
|
||||||
encryption.mode = "none";
|
# Services
|
||||||
repo = "/srv/backup/services";
|
"/srv/services/forgejo"
|
||||||
compression = "auto,zstd";
|
"/srv/services/immich"
|
||||||
startAt = "daily";
|
"/srv/services/minecraft"
|
||||||
};
|
"/srv/services/paperless-ngx"
|
||||||
|
# Containers
|
||||||
|
"/srv/containers/jellyfin"
|
||||||
|
"/srv/containers/lidarr"
|
||||||
|
"/srv/containers/prowlarr"
|
||||||
|
"/srv/containers/qbittorrent"
|
||||||
|
"/srv/containers/radarr"
|
||||||
|
"/srv/containers/sonarr"
|
||||||
|
];
|
||||||
|
|
||||||
shares = {
|
repo = "o93k24r6@o93k24r6.repo.borgbase.com:repo";
|
||||||
paths = [
|
encryption = {
|
||||||
"/srv/shares"
|
mode = "repokey-blake2";
|
||||||
];
|
passCommand = "cat ${config.age.secrets.traefik.path}";
|
||||||
encryption.mode = "none";
|
|
||||||
repo = "/srv/backup/shares";
|
|
||||||
compression = "auto,zstd";
|
|
||||||
startAt = "daily";
|
|
||||||
};
|
};
|
||||||
|
environment.BORG_RSH = "ssh -i /etc/ssh/ssh_host_ed25519_key";
|
||||||
|
compression = "auto,lzma";
|
||||||
|
startAt = "daily";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
BIN
nixos/viridian/services/borgbackup/passphrase.age
Normal file
BIN
nixos/viridian/services/borgbackup/passphrase.age
Normal file
Binary file not shown.
Loading…
Reference in a new issue