feat: make backups every 10 minutes of the world

This commit is contained in:
Jet 2026-03-14 23:26:23 -07:00
parent 5dc86407bd
commit efb94e6f98
No known key found for this signature in database

View file

@ -29,7 +29,7 @@ in
# Compress world data (re-enable saving even if tar fails) # Compress world data (re-enable saving even if tar fails)
if ! ${pkgs.gnutar}/bin/tar czf "$TEMP_BACKUP" \ if ! ${pkgs.gnutar}/bin/tar czf "$TEMP_BACKUP" \
-C ${mcDataDir} world world_nether world_the_end; then -C ${mcDataDir} world; then
echo "tar failed, re-enabling saving" echo "tar failed, re-enabling saving"
docker exec minecraft rcon-cli save-on docker exec minecraft rcon-cli save-on
exit 1 exit 1
@ -60,7 +60,7 @@ in
systemd.timers.minecraft-backup = { systemd.timers.minecraft-backup = {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnCalendar = "*:00,30"; OnCalendar = "*:00/10";
Persistent = true; Persistent = true;
}; };
}; };