Skip to content

Commit

Permalink
feat(backup): add parallel backup creation using pigz (#4509)
Browse files Browse the repository at this point in the history
  • Loading branch information
MicLieg authored Feb 26, 2024
1 parent 9a7670e commit 476ed02
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lgsm/data/almalinux-8.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/almalinux-9.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/centos-7.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/centos-8.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/centos-9.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/debian-10.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ac
ahl
ahl2
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
ark
arma3
armar,libcurl4
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/debian-11.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/debian-12.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/debian-9.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/rhel-7.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/rhel-8.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/rhel-9.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/rocky-8.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python36,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python36,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/rocky-9.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,python3,tar,tmux,unzip,util-linux,wget,xz
all,bc,binutils,bzip2,cpio,curl,epel-release,file,glibc.i686,gzip,hostname,jq,libstdc++,libstdc++.i686,nmap-ncat,pigz,python3,tar,tmux,unzip,util-linux,wget,xz
steamcmd,glibc.i686,libstdc++.i686
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/ubuntu-16.04.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/ubuntu-18.04.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/ubuntu-20.04.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/ubuntu-22.04.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/ubuntu-23.04.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/data/ubuntu-23.10.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils
steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd
ac
ahl
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ for allowed_command in "${allowed_commands_array[@]}"; do
fi
done

allowed_commands_array=(DEBUG START)
allowed_commands_array=(BACKUP DEBUG START)
for allowed_command in "${allowed_commands_array[@]}"; do
if [ "${allowed_command}" == "${commandname}" ]; then
check_deps.sh
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/command_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fn_backup_compression() {
core_exit.sh
fi

tar -czf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./.
tar --use-compress-program=pigz -cf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./.
local exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_print_fail_eol
Expand Down

0 comments on commit 476ed02

Please sign in to comment.