LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

Backup compression program customization (tar can be slow)

Open stere0123 opened this issue 9 years ago • 4 comments

I have noticed that the backup command takes a very long time to backup certain larger servers, especially if they have many files (e.g. a 5GB+ Minecraft server with Dynmap), since the script uses tar, which only utilizes one core for compression. As I have a 16-core server, using only one core is slow and inefficent, to say the least.

I think the backup command should be customizable in each server script, so that the command can be optionally changed to something else like 7-Zip, which uses multiple cores. This would also have the added benefit of allowing users to change the compression presets (since some users may find the backups using 100% of their CPU to be undesirable), and it allows them to exclude certain files/folders directly in the commandline (at least partially fixing #1163).

stere0123 avatar Nov 29 '16 12:11 stere0123

Thanks for the suggestion. It's something to think about. I was unaware of the multi-core feature.

The backup feature was never designed as a full backup solution and I still recommend using something like duplicity. However, some users do like to use the backup feature.

One option for users could be trying the nice command. It should lower the priority of the backup so as not to affect the server much.

dgibbs64 avatar Nov 29 '16 23:11 dgibbs64

I´d like to bump this feature request for command backup. It would be really nice to be able to change compression method from tar to something way more faster in 2019 like zstd which can process the backup 10 times faster compared to tar.

sapphirecz avatar Jul 20 '19 13:07 sapphirecz

There are plans for a backup refactor at some point. This will be one of the issues that will be resolved then. Sadly I can't give a time frame but it is something I want to address

dgibbs64 avatar Nov 25 '19 13:11 dgibbs64

https://github.com/GameServerManagers/LinuxGSM/pull/4795

dgibbs64 avatar Jun 27 '25 10:06 dgibbs64