This commit is contained in:
2026-01-24 13:55:59 +03:00
parent 1646da180a
commit b6c59734ff
+17 -54
View File
@@ -46,60 +46,23 @@
verbose = true; verbose = true;
}; };
}; };
}; archivesta-services = {
}; user = "root";
}; group = "root";
systemd = { timerConfig = {
services = { OnCalendar = "daily";
rsync-archivesta = { Persistent = true;
# Archivesta };
description = "Backup data using rsync"; sources = [
requisite = [ "mnt-archive.mount" ]; # hard-code "${xlib.dirs.services-folder}/"
script = '' ];
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.services-folder}/ ${xlib.dirs.archive-drive}/Services/ destination = "${xlib.dirs.archive-drive}/Services/";
''; settings = {
serviceConfig = { archive = true;
Type = "oneshot"; delete = true;
User = "root"; mkpath = true;
Group = "root"; verbose = true;
Nice = 19; };
IOSchedulingClass = "idle";
};
};
rsync-archivesta-lite = {
# Archivesta Lite
description = "Backup data using rsync";
requisite = [ "mnt-mobile.mount" ]; # hard-code
script = ''
${pkgs.rsync}/bin/rsync -rtv --delete ${xlib.dirs.server-home}/Music/ ${xlib.dirs.mobile-drive}/Music/
${pkgs.rsync}/bin/rsync -rtv --delete "${xlib.dirs.server-home}/Hosts/epral/Neo Backup/" "${xlib.dirs.mobile-drive}/Neo Backup/"
'';
serviceConfig = {
Type = "oneshot";
User = "root";
Group = "root";
Nice = 19;
IOSchedulingClass = "idle";
};
};
};
timers = {
rsync-archivesta = {
description = "Run rsync backup daily";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
Unit = "rsync-archivesta.service";
};
};
rsync-archivesta-lite = {
description = "Run rsync backup weekly";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "weekly";
Persistent = true;
Unit = "rsync-archivesta-lite.service";
}; };
}; };
}; };