valheim-server-docker icon indicating copy to clipboard operation
valheim-server-docker copied to clipboard

Backups include auto backups in zip files

Open barnhill opened this issue 1 year ago • 1 comments

When the backups are zipped it is including the entire worlds folder contents which includes the auto backups the server is doing itself in the zip files. This bloats the zipped backups that this container is doing.

Here is the line in question in valheim-backup

zip -r "$backup_file" "$WORLDS_DIR/"

Maybe it should just include the current db and fwl file?

Screenshot 2024-09-03 at 11 19 57 AM

Maybe a filter to not include files with backup in the name?

barnhill avatar Sep 03 '24 16:09 barnhill

Maybe as simple as using this command ... unsure as I havent tested it locally

zip -r "$backup_file" "$WORLDS_DIR/" -x *backup*.*

barnhill avatar Sep 03 '24 16:09 barnhill

@barnhill I created a PR that will exclude the backup_auto files. However in your screenshot I also see backup files. Do you know where those come from? I couldn't replicate them on my system. I didn't want to exclude backup just in case some user named their world "something backup something".

lloesche avatar Mar 23 '25 15:03 lloesche

Actually I'm unsure of their origin. I think excluding the auto backups will suffice for now to shrink the zip files and probably speed up the server start time since backups delay the start. Good job!! 👍

barnhill avatar Mar 23 '25 16:03 barnhill