Skip to content

Conversation

@jsmeix
Copy link
Member

@jsmeix jsmeix commented Jul 13, 2016

Implemented enhancement #904

BACKUP_PROG_COMPRESS_OPTIONS is now an array
so that one can use it to provide more complex values.

E.g. to override the gzip default compression level (-6)
via the tar '-I' option like
BACKUP_PROG_COMPRESS_OPTIONS=( -I 'gzip -9 -n -c' )

But using it with command options (as in 'gzip -9')
fails with tar versions before 1.27 with a tar error
message like "gzip -9: Cannot exec" because only
since tar version 1.27 tar supports passing command
line arguments to external commands, see
http://git.savannah.gnu.org/cgit/tar.git/plain/NEWS?id=release_1_27

@jsmeix jsmeix added the enhancement Adaptions and new features label Jul 13, 2016
@jsmeix jsmeix added this to the Rear v1.19 milestone Jul 13, 2016
@jsmeix jsmeix self-assigned this Jul 13, 2016
@jsmeix
Copy link
Member Author

jsmeix commented Jul 13, 2016

I tested it on SLES12 SP1 with tar version 1.27.1
both with

BACKUP_PROG_COMPRESS_OPTIONS=( -I 'gzip -9 -n -c' )

and also without it i.e. using the default

BACKUP_PROG_COMPRESS_OPTIONS=( --gzip )

from usr/share/rear/conf/default.conf
and for me it "just works".

In case of

BACKUP_PROG_COMPRESS_OPTIONS=( -I 'gzip -9 -n -c' )

the backup.log file contains (long line shown wrapped here):

++ tar --warning=no-xdev --sparse --block-number
 --totals --verbose --no-wildcards-match-slash
 --one-file-system --ignore-failed-read
 --anchored -I 'gzip -9 -n -c' -X ...

In case of the new default

BACKUP_PROG_COMPRESS_OPTIONS=( --gzip )

and also with the old default

BACKUP_PROG_COMPRESS_OPTIONS="--gzip"

the backup.log file contains (long line shown wrapped here):

++ tar --warning=no-xdev --sparse --block-number
 --totals --verbose --no-wildcards-match-slash
 --one-file-system --ignore-failed-read
 --anchored --gzip -X ...

@jsmeix
Copy link
Member Author

jsmeix commented Jul 13, 2016

I don't think there could be regressions.
Therefore I merge it.

@jsmeix jsmeix merged commit 8cebacb into rear:master Jul 13, 2016
@jsmeix jsmeix deleted the use_BACKUP_PROG_COMPRESS_OPTIONS_as_array_issue904 branch July 13, 2016 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adaptions and new features fixed / solved / done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant