extract gzip #11

Merged
merged 2 commits into from Nov 5, 2015

Conversation

Projects
None yet
3 participants
Contributor

tvlooy commented Jan 21, 2013

Backups can't be restored when they are gzipped. This fix implements a gunzip before extracting.

@tvlooy tvlooy extract gzip
Backups can't be restored when they are gzipped. This fix implements a gunzip before extracting.
fccccbf

I have few comments.

  • use ${TAR} instead of "tar" or "busybox tar"
  • use logger instead of echo
  • maybe test for .gz and .tgz
  • maybe remove the IF about the .tgz at the end

to get something like this

if [ ${VM_TO_RESTORE##.} == 'gz' -o ${VM_TO_RESTORE##.} == '.tgz' ]; then
logger "GZ found, extracting ..."
${TAR} -xzf $VM_TO_RESTORE -C dirname $VM_TO_RESTORE
VM_TO_RESTORE=${VM_TO_RESTORE%.*}
fi

Contributor

tvlooy commented Jan 22, 2013

Thanks. I changed the code. I didn't add a check for .tgz because the backup script creates .gz only.

lamw merged commit ab0dfa1 into lamw:master Nov 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment