GameServerManagers / GameServerManagers/LinuxGSM
[FEATURE] Add a blacklist file to prevent from backing up useless files
- Dominant language
- Shell
- Stars
- 4.9k
- Forks
- 864
- PR merge metrics
- No merged PRs in 30d
Description
## 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 `.vpk` files 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 `.vpk` files, 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 `.vpk` files 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.bsp` but backing up `de_custommap.bsp`.
Therefore, the best way to go around this would be to have a file called `backup_blacklist.txt` somewhere in `lgsm/` 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](https://github.com/Sarrus1/maplistGenerator) if that helps.
Thanks a lot for reading!
Contributor guide
Assessment
This issue has not been assessed yet.