build files for making podman containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
486 B

#!/bin/bash
worlds_dir="/home/vhadmin/.config/unity3d/IronGate/Valheim/worlds_local"
if [[ -z $1 ]]; then
echo "Usage: $0 backup_dir"
exit 2
fi
backup_dir="$1"
# Check if backup dir already exists
if [[ -e "$backup_dir" ]]; then
echo "Error: backup dir already exists. Delete directory before proceeding or use another directory name."
exit 1
fi
echo "Creating directory \"$backup_dir\"..."
mkdir -p "$backup_dir"
# copy files
rsync -aSH $worlds_dir/ "$backup_dir/"