-
-
Notifications
You must be signed in to change notification settings - Fork 131
Description
Is your feature request related to a problem? Please describe.
Not really a problem but I stop containers before backup and the time it takes to finish it is a few minutes.
Describe the solution you'd like
Support zstd as compression algorithm.
Describe alternatives you've considered
n/a
Additional context
Ok, here's the meat. I forked your repo and tested replacing gzipWriter with Zstd Encoder and it was a drop-in replacement. I hit only one small issue.
I know my stats are very rough but I hope the advantage is apparent:
Gzip:
time="2023-01-21T13:45:08-06:00" level=info msg="Stopping 3 container(s) labeled `docker-volume-backup.stop-during-backup=true` out of 10 running container(s)."
time="2023-01-21T13:48:13-06:00" level=info msg="Created backup of `/backup` at `/tmp/backup-2023-01-21T13-45-08.tar.gz`."
time="2023-01-21T13:48:15-06:00" level=info msg="Restarted 3 container(s) and the matching service(s)."
time="2023-01-21T13:48:18-06:00" level=info msg="Removed tar file `/tmp/backup-2023-01-21T13-45-08.tar.gz`."
time="2023-01-21T13:48:18-06:00" level=info msg="Finished running backup tasks."
Zstd:
time="2023-01-21T13:41:59-06:00" level=info msg="Stopping 3 container(s) labeled `docker-volume-backup.stop-during-backup=true` out of 10 running container(s)."
time="2023-01-21T13:42:43-06:00" level=info msg="Created backup of `/backup` at `/tmp/backup-2023-01-21T13-41-59.tar.zst`."
time="2023-01-21T13:42:45-06:00" level=info msg="Restarted 3 container(s) and the matching service(s)."
time="2023-01-21T13:42:47-06:00" level=info msg="Removed tar file `/tmp/backup-2023-01-21T13-41-59.tar.zst`."
time="2023-01-21T13:42:47-06:00" level=info msg="Finished running backup tasks."
These were two backups on the same system. Notice the gzip version took 3min 5sec (including container shut down) while zstd took only 42sec!
Uncompressed Tar size was about 6392644096, gzipped: 3990896812, zstd: 3931777630. However the time savings are the most important aspect to me.