Skip to content

Commit

Permalink
Merge pull request #85 from justino/master
Browse files Browse the repository at this point in the history
Support for pbzip2
  • Loading branch information
abg committed Jul 11, 2012
2 parents b36396c + bb7e58a commit 88fb0b6
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions config/backupsets/examples/mysql-lvm.conf
Expand Up @@ -52,9 +52,9 @@ estimated-size-factor = 1.0
## Compression Settings
[compression]

## compress method: gzip, bzip2, lzop, or xz
## compress method: gzip, bzip2, pbzip2, lzop, or xz
## Which compression method to use, which can be either gzip, bzip2, or lzop.
## Note that lzop is not often installed by default on many Linux
## Note that pbzip2 and lzop are not often installed by default on many Linux
## distributions and may need to be installed separately.
method = gzip

Expand Down
4 changes: 2 additions & 2 deletions config/backupsets/examples/mysqldump.conf
Expand Up @@ -92,9 +92,9 @@ additional-options = ""
## Compression Settings
[compression]

## compress method: gzip, bzip2, lzop, or xz
## compress method: gzip, bzip2, pbzip2, lzop, or xz
## Which compression method to use, which can be either gzip, bzip2, or lzop.
## Note that lzop is not often installed by default on many Linux
## Note that pbzip2 and lzop are not often installed by default on many Linux
## distributions and may need to be installed separately.
method = gzip

Expand Down
2 changes: 1 addition & 1 deletion config/providers/mysqldump.conf
Expand Up @@ -83,7 +83,7 @@ additional-options = ""
## Compression Settings
[compression]

## compress method: gzip, bzip2 or lzop
## compress method: gzip, bzip2, pbzip2, or lzop
## Which compression method to use, which can be either gzip, bzip2, or lzop.
## Note that lzop is not often installed by default on many Linux
## distributions and may need to be installed separately.
Expand Down
2 changes: 1 addition & 1 deletion config/providers/sqlite.conf
Expand Up @@ -12,7 +12,7 @@ binary = /usr/bin/sqlite3
## Compression Settings
[compression]

## Compress method: gzip, bzip2 or lzop
## Compress method: gzip, bzip2, pbzip2, or lzop
## Which compression method to use, which can be either gzip, bzip2, or lzop.
## Note that lzop is not often installed by default on many Linux
## distributions and may need to be installed separately.
Expand Down
Expand Up @@ -49,7 +49,7 @@
pre-args = string(default=None)
[compression]
method = option('none', 'gzip', 'pigz', 'bzip2', 'lzop', default='gzip')
method = option('none', 'gzip', 'pigz', 'bzip2', 'pbzip2', 'lzop', default='gzip')
level = integer(min=0, max=9, default=1)
[mysql:client]
Expand Down
2 changes: 1 addition & 1 deletion plugins/holland.backup.mysqldump/README
Expand Up @@ -6,7 +6,7 @@ skipped by simply not passing them to the --database flags.

Inline-compression of mysqldump output is supported and the default. By
default mechanism uses gzip -1 ("--fast") for fast but reasonable compression.
bzip2, lzop and lzma (vi xz-utils) are also supported.
bzip2, pbzip2, lzop and lzma (vi xz-utils) are also supported.

For more information please consult the holland manual or visit the holland
wiki at http://hollandbackup.org.
Expand Up @@ -56,7 +56,7 @@
estimate-method = string(default='plugin')
[compression]
method = option('none', 'gzip', 'pigz', 'bzip2', 'lzma', 'lzop', default='gzip')
method = option('none', 'gzip', 'pigz', 'bzip2', 'pbzip2', 'lzma', 'lzop', default='gzip')
inline = boolean(default=yes)
level = integer(min=0, max=9, default=1)
Expand Down
Expand Up @@ -64,7 +64,7 @@
# Only applicable to certain archive types
# (e.g. zip only supports 'zlib' internal compression)
[compression]
method = option('none','gzip','pigz','bzip2','lzma','lzop',default='gzip')
method = option('none','gzip','pigz','bzip2','pbzip2','lzma','lzop',default='gzip')
inline = boolean(default=false)
level = integer(default=1,min=0,max=9)
bin-path = string(default=None)
Expand Down
Expand Up @@ -34,7 +34,7 @@
additional-options = string(default=None)
[compression]
method = option('gzip', 'bzip2', 'lzop', 'lzma', 'pigz', 'none', default='gzip')
method = option('gzip', 'bzip2', 'pbzip2', 'lzop', 'lzma', 'pigz', 'none', default='gzip')
level = integer(min=0, default=1)
[pgauth]
Expand Down
2 changes: 1 addition & 1 deletion plugins/holland.backup.sqlite/holland/backup/sqlite.py
Expand Up @@ -15,7 +15,7 @@
binary = string(default=/usr/bin/sqlite3)
[compression]
method = option('none', 'gzip', 'pigz', 'bzip2', 'lzop', default='gzip')
method = option('none', 'gzip', 'pigz', 'bzip2', 'pbzip2', 'lzop', default='gzip')
inline = boolean(default=yes)
level = integer(min=0, max=9, default=1)
""".splitlines()
Expand Down
Expand Up @@ -31,7 +31,7 @@
pre-command = string(default=None)
[compression]
method = option('none', 'gzip', 'pigz', 'bzip2', 'lzma', 'lzop', default='gzip')
method = option('none', 'gzip', 'pigz', 'bzip2', 'pbzip2', 'lzma', 'lzop', default='gzip')
inline = boolean(default=yes)
level = integer(min=0, max=9, default=1)
Expand Down
5 changes: 3 additions & 2 deletions plugins/holland.lib.common/holland/lib/compression.py
Expand Up @@ -10,6 +10,7 @@
'gzip' : ('gzip', '.gz'),
'pigz' : ('pigz', '.gz'),
'bzip2' : ('bzip2', '.bz2'),
'pbzip2': ('pzip2', '.bz2'),
'lzop' : ('lzop', '.lzo'),
'lzma' : ('xz', '.xz'),
}
Expand Down Expand Up @@ -143,7 +144,7 @@ def stream_info(path, method=None, level=None):
Arguments:
path -- Path to file to compress/decompress
method -- Compression method (i.e. 'gzip', 'bzip2', 'lzop')
method -- Compression method (i.e. 'gzip', 'bzip2', 'pbzip2', 'lzop')
level -- Compression level (0-9)
"""
if not method or level == 0:
Expand All @@ -168,7 +169,7 @@ def open_stream(path, mode, method=None, level=None, inline=True):
Arguments:
mode -- File access mode (i.e. 'r' or 'w')
method -- Compression method (i.e. 'gzip', 'bzip2', 'lzop')
method -- Compression method (i.e. 'gzip', 'bzip2', 'pbzip2', 'lzop')
level -- Compression level
inline -- Boolean whether to compress inline, or after the file is written.
"""
Expand Down
2 changes: 1 addition & 1 deletion test_config/backupsets/traditional.conf
Expand Up @@ -47,7 +47,7 @@ backup-size-factor = 1.0

## Compression settings
[compression]
## compress method: gzip, bzip2 or lzop
## compress method: gzip, bzip2, pbzip2, or lzop
method = gzip
## where to compress data as it's output
## or compress a file at the end
Expand Down
2 changes: 1 addition & 1 deletion test_config/providers/mysqldump.conf
Expand Up @@ -41,7 +41,7 @@ backup-size-factor = 1.0

# Compression settings
[compression]
# compress method: gzip, bzip2 or lzop
# compress method: gzip, bzip2, pbzip2, or lzop
method = gzip
# where to compress data as it's output
# or compress a file at the end
Expand Down
Expand Up @@ -83,9 +83,10 @@ additional-options = ""
## Compression Settings
[compression]

## compress method: gzip, bzip2 or lzop
## Which compression method to use, which can be either gzip, bzip2, or lzop.
## Note that lzop is not often installed by default on many Linux
## compress method: gzip, bzip2, pbzip2, or lzop
## Which compression method to use, which can be either gzip, bzip2, pbzip2, or
## lzop.
## Note that pbzip2 and lzop are not often installed by default on many Linux
## distributions and may need to be installed separately.
method = gzip

Expand Down
Expand Up @@ -5,7 +5,7 @@ binary = /usr/bin/sqlite3

## Compression settings
[compression]
## compress method: gzip, bzip2 or lzop
## compress method: gzip, bzip2, pbzip2, or lzop
method = gzip
## where to compress data as it's output
## or compress a file at the end
Expand Down

0 comments on commit 88fb0b6

Please sign in to comment.