Closed crispycream4749 closed 4 weeks ago
Hi, @crispycream4749, sorry for the late response I'm very busy IRL, I will think about this, because right now I use the LinuxGSM backup command, also this can be achieved relative easy with an external script that stop the docker container and backup the folder, here it's an example:
#!/bin/bash
# Set your Docker container name
DOCKER_CONTAINER_NAME="your_container_name"
# Set the folder to be backed up
BACKUP_FOLDER="/path/to/your/world/folder"
# Set the backup destination
BACKUP_DESTINATION="/path/to/backup/destination"
# Stop the Docker container
echo "Stopping Docker container: $DOCKER_CONTAINER_NAME"
docker stop $DOCKER_CONTAINER_NAME
# Backup the specified folder
echo "Backing up folder: $BACKUP_FOLDER"
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
BACKUP_FILE="$BACKUP_DESTINATION/sdtdserver_world_$TIMESTAMP.tar.gz"
tar -czvf $BACKUP_FILE $BACKUP_FOLDER
# Start the Docker container again
echo "Starting Docker container: $DOCKER_CONTAINER_NAME"
docker start $DOCKER_CONTAINER_NAME
echo "Backup completed. Backup file: $BACKUP_FILE"
Just create a file with the above code and add an execution to your crontab system.
I'm adding support for custom mods from Nexus mod, but later I will add this too.
DISCLAIMER: This script isn't tested.
This should be fixed with #250
If it needs more discussion #249
current backup mechanism backups everything including server files. This causes very large zip backups.
I would like if the backups only backed up world and save data.