aboutsummaryrefslogtreecommitdiff
path: root/mc-fbackup.service
diff options
context:
space:
mode:
authorGravatar KamiCreed <9517086+KamiCreed@users.noreply.github.com> 2020-03-29 04:45:46 -0700
committerGravatar KamiCreed <9517086+KamiCreed@users.noreply.github.com> 2020-03-29 04:45:46 -0700
commitfc198700f0454d5f145de19bb4da31ad46feffe8 (patch)
tree465a53285650af05b5112d542f2ec7c2a8ff7317 /mc-fbackup.service
parent631e796812bdd9830fd2fb2f5c05d8323e67b50c (diff)
downloadminecraft-server-tools-fc198700f0454d5f145de19bb4da31ad46feffe8.tar.gz
Change backups to only when a player is online
Also, adds a fallback daily forced backup and error handling to prevent concurrent backup.
Diffstat (limited to 'mc-fbackup.service')
-rw-r--r--mc-fbackup.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/mc-fbackup.service b/mc-fbackup.service
new file mode 100644
index 0000000..a922b69
--- /dev/null
+++ b/mc-fbackup.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Force backup of Minecraft Server
+
+[Service]
+Type=simple
+User=minecraftuser
+Group=minecraftuser
+ExecStart=/var/minecraft/server.sh fbackup
+Restart=on-failure
+RestartSec=10s
+StartLimitInterval=10min
+StartLimitBurst=8
+
+[Install]
+WantedBy=multi-user.target