add backup box
This commit is contained in:
parent
4169da9e22
commit
a2be1730e9
3 changed files with 34 additions and 12 deletions
|
|
@ -17,17 +17,6 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.scheduled-commands.backup-to-thinkpad = {
|
|
||||||
enable = true;
|
|
||||||
description = "Backup files to thinkpad";
|
|
||||||
interval = "*-*-* 00:00:00";
|
|
||||||
commands = [
|
|
||||||
"rsync-backup /mnt/storage/appbulk/immich/library/admin thinkpad:~/Backup/photo-library"
|
|
||||||
"rsync-backup /mnt/storage/Media/DCIM thinkpad:~/Backup/DCIM"
|
|
||||||
"rsync-backup /mnt/storage/Media/nsfw thinkpad:~/Backup/nsfw"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@
|
||||||
showDiskUsage = true;
|
showDiskUsage = true;
|
||||||
diskUsagePaths = [ "/" "/home/" "/mnt/storage" "/mnt/parity" ];
|
diskUsagePaths = [ "/" "/home/" "/mnt/storage" "/mnt/parity" ];
|
||||||
showSnapraidStatus = true;
|
showSnapraidStatus = true;
|
||||||
showBorgStatus = false;
|
showBorgStatus = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.tailscale-custom = {
|
services.tailscale-custom = {
|
||||||
|
|
@ -239,4 +239,30 @@
|
||||||
plex.enable = true;
|
plex.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Borg backup configuration
|
||||||
|
services.borg-client-custom = {
|
||||||
|
enable = true;
|
||||||
|
repositoryUrl = "ssh://backup-box/./hs";
|
||||||
|
backupPaths = [
|
||||||
|
"/mnt/storage/appbulk/immich/library/"
|
||||||
|
"/mnt/storage/Media/DCIM"
|
||||||
|
"/mnt/storage/Media/nsfw"
|
||||||
|
];
|
||||||
|
backupFrequency = "*-*-* 00:00:00";
|
||||||
|
retention = {
|
||||||
|
keepDaily = 7;
|
||||||
|
keepWeekly = 4;
|
||||||
|
keepMonthly = 6;
|
||||||
|
keepYearly = 2;
|
||||||
|
};
|
||||||
|
passphraseFile = "/etc/borg-passphrase";
|
||||||
|
|
||||||
|
preHook = ''
|
||||||
|
echo "$(date): Starting Borg backup of ${config.networking.hostName}"
|
||||||
|
'';
|
||||||
|
postHook = ''
|
||||||
|
echo "$(date): Borg backup of ${config.networking.hostName} completed successfully"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,13 @@
|
||||||
identityFile = "~/Credentials/ssh_keys/hetzner";
|
identityFile = "~/Credentials/ssh_keys/hetzner";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"backup-box" = {
|
||||||
|
hostname = "u515619.your-storagebox.de";
|
||||||
|
user = "u515619";
|
||||||
|
identityFile = "~/Credentials/ssh_keys/hetzner";
|
||||||
|
port = 23;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue