mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-24 21:56:01 +03:00
[GH-ISSUE #3298] [FEATURE] Add a blacklist file to prevent from backing up useless files #2277
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#2277
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Sarrus1 on GitHub (Feb 23, 2021).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/3298
My use case
I use LGSM to manage CS:GO servers, and I do backup every other weeks. However, each backup takes up to 13GB of space, and takes around 10 mins with the CPU running at 100% to complete.
The Idea
A way to reduce space taken up and time to run would be to implement a blacklist of the files we don't want to backup. In CS:GO's specific case, all
.vpkfiles can be ignored for (i think) 99% of installation as they are only generic texture files that can be reobtained by running./csgoserver validate.A CS:GO server install is around 22Go without any custom maps. There are 166
.vpkfiles, each taking up more or less 120MB. The exact space they take up is around 20Go. Ignoring those files would shrink the backup file by around 90%.My take on how to implement this
The simplest solution would be to whitelist files by extensions, (i.e ignore all
.vpkfiles in my case)However, for CS:GO and other source based games, it might be interesting to ignore some map files, while keeping others, for example not backing up
de_dust2.bspbut backing upde_custommap.bsp.Therefore, the best way to go around this would be to have a file called
backup_blacklist.txtsomewhere inlgsm/and adding each file to be ignored, with its extension, line by line in this file.I made a similar script using Python to generate a maplist.txt file which you can find here if that helps.
Thanks a lot for reading!
@MicLieg commented on GitHub (Feb 25, 2024):
link #2106
@Romaq commented on GitHub (Jan 18, 2025):
This issue is stale, but there appears to be no word on it.
Backups are 37G. 26G of that is "BlueMap," a mod that displays a current state of the map as a whole. It can be entirely reconstituted from the actual *.mca files used by the server itself. Ignoring the data in
./serverfiles/bluemap/web/maps/*/tileswould vastly free up resources.Would anyone have a work-around or alternate solution until
./command_backup.shis refactored for an IGNORE list?@MicLieg commented on GitHub (Jan 18, 2025):
Unfortunately, most issues are yes.
You should be able to add another excluded directory within the command_backup.sh file.
If you want to exclude only the tiles from each map, you must specify each map's tiles folder separately:
Keep in mind that updating LGSM might overwrite that change.
Alternatively, you can choose to store the Bluemap tiles in a database to also speed up map rendering in the web application.
@codingWithJimmy commented on GitHub (Jan 18, 2025):
The tar command allows two separate types of exclusions when it's invoked. One is single item exclusions like the command is written now. There are two other methods that use a file to maintain a list of exclusions that could be leveraged such as
-Xor--exclude-file.For example, you could have a setting in the game's config file like
backupexclusion.cfgwhere each line of the file is either an explicit file or a path likeserverfiles/bluemapand it should exclude that directory.Then call to the file like this.
This also allows for management of other games where you can exclude the entire installation in
serverfilesand severely reduce your backup size.