diff --git a/bin/ncp/BACKUPS/nc-backup.sh b/bin/ncp/BACKUPS/nc-backup.sh index 96646f609..c3e48d6ce 100644 --- a/bin/ncp/BACKUPS/nc-backup.sh +++ b/bin/ncp/BACKUPS/nc-backup.sh @@ -9,6 +9,9 @@ install() { + apt-get update + apt-get install -y --no-install-recommends pigz + cat > /usr/local/bin/ncp-backup <<'EOF' #!/bin/bash set -eE @@ -67,9 +70,9 @@ mysqldump -u root --single-transaction nextcloud > "$dbbackup" # files echo "backup files..." [[ "$includedata" == "yes" ]] && data="$(basename "$datadir")" -[[ "$compress" == "yes" ]] && z=z +[[ "$compress" == "yes" ]] && compress_arg="-I pigz" mkdir -p "$destdir" -tar -c${z}f "$destfile" \ +tar $compress_arg -cf "$destfile" \ \ "$dbbackup" \ \ diff --git a/bin/ncp/BACKUPS/nc-restore.sh b/bin/ncp/BACKUPS/nc-restore.sh index 38d175db8..eaf36f98b 100644 --- a/bin/ncp/BACKUPS/nc-restore.sh +++ b/bin/ncp/BACKUPS/nc-restore.sh @@ -40,8 +40,8 @@ rm -rf "$TMPDIR" && mkdir -p "$TMPDIR" # EXTRACT FILES echo "extracting backup file $BACKUPFILE..." -[[ "$BACKUPFILE" =~ ".tar.gz" ]] && z=z -tar -x${z}f "$BACKUPFILE" -C "$TMPDIR" || exit 1 +[[ "$BACKUPFILE" =~ ".tar.gz" ]] && compress_arg="-I pigz" +tar $compress_arg -xf "$BACKUPFILE" -C "$TMPDIR" || exit 1 ## SANITY CHECKS [[ -d "$TMPDIR"/nextcloud ]] && [[ -f "$( ls "$TMPDIR"/nextcloud-sqlbkp_*.bak 2>/dev/null )" ]] || { diff --git a/changelog.md b/changelog.md index 987a64f2c..92c1e8bd8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,9 @@ -[v1.3.10](https://github.com/nextcloud/nextcloudpi/commit/b9fd429) (2019-01-15) nc-backup: compress in place and exclude previews folder +[v1.3.11](https://github.com/nextcloud/nextcloudpi/commit/418aa74) (2019-01-16) nc-backup: parallel compression -[v1.3.9](https://github.com/nextcloud/nextcloudpi/commit/0b8252b) (2019-01-15) build: add exfat utils for external storage +[v1.3.10](https://github.com/nextcloud/nextcloudpi/commit/2419e57) (2019-01-15) nc-backup: compress in place and exclude previews folder + +[v1.3.9 ](https://github.com/nextcloud/nextcloudpi/commit/0b8252b) (2019-01-15) build: add exfat utils for external storage [v1.3.8 ](https://github.com/nextcloud/nextcloudpi/commit/193d89b) (2019-01-14) nc-datadir: fix fail2ban logpath