gameserver backups

This commit is contained in:
2025-10-17 21:10:42 -05:00
parent 13a5def7d7
commit 2f77f3b3a3
2 changed files with 5 additions and 4 deletions

View File

@@ -19,10 +19,8 @@ let
timemachine = {
browseable = true;
"path" = "/holocron/archives/timemachine";
"valid users" = "blake";
"public" = "no";
"writeable" = "yes";
"force user" = "blake";
"fruit:aapl" = "yes";
"fruit:time machine" = "yes";
"vfs objects" = "catia fruit streams_xattr";

View File

@@ -72,6 +72,7 @@ in {
Type = "oneshot";
User = "root";
Group = "archives"; # make perms shake out
UMask = "0007"; # make perms shake out
# the actual script borg is using
ExecStart = pkgs.writeShellScript "borg-backup" ''
backup() {
@@ -175,6 +176,7 @@ in {
Type = "oneshot";
User = "root";
Group = "archives"; # make perms shake out
UMask = "0007"; # make perms shake out
# the actual script borg is using
ExecStart = pkgs.writeShellScript "borg-gameserver_backup" ''
backup() {
@@ -219,6 +221,7 @@ in {
''
)
cfg.gameserver_baks)}
exit 0
}
start_time=$(date +%s)
backup
@@ -237,7 +240,7 @@ in {
description = "daily borg backup timer";
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "*-*-* *:01:00"; # every hour, at :01
OnCalendar = "*-*-* *:01:00"; # every hour, at :01 (one min after db dump)
Persistent = true;
};
};
@@ -248,7 +251,7 @@ in {
enable = true;
location = "/var/backup/mysql";
user = "root";
calendar = "*-*-* *:01:00";
calendar = "*-*-* *:00:00";
compressionAlg = "zstd";
databases = config.services.mysql.ensureDatabases; # set to all databases defined in esure databases
};