lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.91k stars 269 forks source link

Server backing up all the time #576

Closed lazerleif closed 1 year ago

lazerleif commented 1 year ago

Hello,

I have a strange issue where my server tries to backup all the time. I first noticed this when i ran out of disk due all the backups. Changed BACKUPS_MAX_COUNT to 12 and BACKUPS_MAX_AGE to 3 so my disk wont be filled with backups. The server still want to make backups so i changed BACKUPS_IF_IDLE to false and now i get:

supervisord: valheim-backup DEBUG - [98] - Received signal to backup world supervisord: valheim-backup DEBUG - [98] - Not running backup as there has been no server activity since Mon 30 Jan 2023 05:56:51 PM CET

But still the server want to backup every minute.

valheim.env

PUID=1000
PGID=1000
TZ=Europe/Stockholm
SERVER_NAME="Munkbron heroes"
WORLD_NAME=Munkbron
SERVER_PASS="XXXXXX"
SERVER_PUBLIC=true
BACKUPS_MAX_AGE=3
BACKUPS_MAX_COUNT=12
BACKUPS_CRON="* */3 * * *"
BACKUPS_IF_IDLE=false
BACKUPS_IDLE_GRACE_PERIOD=3600
SUPERVISOR_HTTP=true
SUPERVISOR_HTTP_PORT=9001
SUPERVISOR_HTTP_USER=XXXXX
SUPERVISOR_HTTP_PASS=XXXXX
UPDATE_CRON="0 3 * * *"
STATUS_HTTP=true
UPDATE_IF_IDLE=true
BEPINEX=true

docker-compose

version: "3"

services: 
  valheim: 
    image: ghcr.io/lloesche/valheim-server
    container_name: valheim
    cap_add:
      - sys_nice
    volumes: 
      - ./config:/config
      - ./data:/opt/valheim
    ports: 
      - "2456-2457:2456-2457/udp"
      - "9001:9001/tcp"
      - "8030:80"
    env_file:
      - ./valheim.env
    restart: always
    stop_grace_period: 2m
networks:
  default:
    external:
      name: proxy
lazerleif commented 1 year ago

Okay im an idiot :)

* */3 * * * is at every minute past every 3rd hour. changed it to: 0 */3 * * * which is at minute 0 past every 3rd hour.

Thanks to https://crontab.guru/