docker-mc-backup
docker-mc-backup copied to clipboard
Receiving "Cannot open: Permission denied" error
I'm receiving a "Cannot open: Permission denied" error when trying to run a tar backup.
Here are the contents of my docker-compose file. Do I have something wrong?
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
TYPE: FABRIC
VERSION: 1.20.1
INIT_MEMORY: 1024M
MAX_MEMORY: 5120M
MOTD: A Drewbuntu Server
DIFFICULTY: Normal
SERVER_NAME: Tuxcraft Fabric
PLAYER_IDLE_TIMEOUT: 0
PLUGINS: |
https://cdn.modrinth.com/data/L695BdOy/versions/EjNpDfo3/SetSpawn-3.1.jar
ICON: https://icons.iconarchive.com/icons/papirus-team/papirus-apps/72/tux-icon.png
depends_on:
restore-backup:
condition: service_completed_successfully
volumes:
- ./minecraft-data:/data
- ./mods.txt:/extras/mods.txt:ro
restore-backup:
# Same image as mc, but any base image with bash and tar will work
image: itzg/mc-backup
user: "1000"
restart: no
entrypoint: restore-tar-backup
volumes:
# Must be same mount as mc service, needs to be writable
- ./minecraft-data:/data
# Must be same mount as backups service, but can be read-only
- ./minecraft-backups:/backups:ro
backups:
image: itzg/mc-backup
user: "1000"
depends_on:
mc:
condition: service_healthy
environment:
BACKUP_INTERVAL: "4h"
RCON_HOST: mc
# since this service waits for mc to be healthy, no initial delay is needed
INITIAL_DELAY: 0
# As an example, to backup only the world data:
# INCLUDES: world,world_nether,world_the_end
PRUNE_BACKUPS_DAYS: 7
volumes:
- ./minecraft-data:/data:ro
- ./minecraft-backups:/backups