mirror of
https://github.com/YuzuZensai/palworld-server-docker.git
synced 2026-01-30 12:22:57 +00:00
optionally delete old backups
This commit is contained in:
@@ -15,3 +15,8 @@ if [ "$(id -u)" -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "backup created at $FILE_PATH"
|
echo "backup created at $FILE_PATH"
|
||||||
|
|
||||||
|
if [ "${DELETE_OLD_BACKUPS}" = true ]; then
|
||||||
|
echo "removing backups older than $OLD_BACKUP_DAYS days"
|
||||||
|
find /palworld/backups/ -mindepth 1 -maxdepth 1 -mtime +$OLD_BACKUP_DAYS -print -delete
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user