From 6ceda7e3e675318dab36b067f516999625bbae57 Mon Sep 17 00:00:00 2001 From: Aaron Ball Date: Fri, 7 Oct 2016 19:03:47 -0600 Subject: Converted backup compression from bzip2 to gzip Bzip2 isn't available on all android devices, as it is usually installed with busybox or toybox. Gzip however is available in vanilla android. --- andbackup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/andbackup.sh b/andbackup.sh index 2093832..9bb3326 100755 --- a/andbackup.sh +++ b/andbackup.sh @@ -67,8 +67,7 @@ function backup_app { # Compress the backup echo "Compressing userdata for ${app}" cd ${backups}/${app}/ - tar -cf data.tar data - bzip2 -f data.tar + tar -c data | gzip -c > data.tar.gz rm -rf data } @@ -117,7 +116,7 @@ function restore_app { # Decompress backup echo "Decompressing user data for ${app}." cd ${backups}/${app}/ - bunzip2 -c data.tar.bz2 | tar -x + gzip -d -c data.tar.gz | tar -x # Copy the user data in cp -rp ${backups}/${app}/data/* ${data}/ -- cgit v1.2.3