Use multithread compressor #87

Closed
mudragel opened this Issue Mar 8, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@mudragel

mudragel commented Mar 8, 2017

How I can use lbzip2 as directory compressor?
Like this:
tar cf linux2.tar.bz2 linux --use-compress-program=lbzip2

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Mar 8, 2017

Owner
<backup>
  <source type="tar">
    <option name="path" value="/some/dir"/>
  </source>
  <target dirname="/backup" filename="dir-%Y%m%d-%H%i.tar" compress="bzip2"/>
<backup>

This will create a /backup/dir-20170308-2005.tar.bz2 containing /some/dir

Hope that helps

Owner

sebastianfeldmann commented Mar 8, 2017

<backup>
  <source type="tar">
    <option name="path" value="/some/dir"/>
  </source>
  <target dirname="/backup" filename="dir-%Y%m%d-%H%i.tar" compress="bzip2"/>
<backup>

This will create a /backup/dir-20170308-2005.tar.bz2 containing /some/dir

Hope that helps

@mudragel

This comment has been minimized.

Show comment
Hide comment
@mudragel

mudragel Mar 8, 2017

I mean lbzip2 not standard bzip2. lbzip2 can use multithread for compressing as mentioned at http://www.cnx-software.com/2016/12/16/compress-decompress-files-faster-with-lbzip2-multi-threaded-version-of-bzip2/

mudragel commented Mar 8, 2017

I mean lbzip2 not standard bzip2. lbzip2 can use multithread for compressing as mentioned at http://www.cnx-software.com/2016/12/16/compress-decompress-files-faster-with-lbzip2-multi-threaded-version-of-bzip2/

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Mar 8, 2017

Owner

Currently there is now way to do so :/

Owner

sebastianfeldmann commented Mar 8, 2017

Currently there is now way to do so :/

@mudragel

This comment has been minimized.

Show comment
Hide comment
@mudragel

mudragel Mar 8, 2017

It will be a cool feature!

mudragel commented Mar 8, 2017

It will be a cool feature!

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Mar 8, 2017

Owner

Definitely ;)

Owner

sebastianfeldmann commented Mar 8, 2017

Definitely ;)

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Mar 29, 2017

Owner

I just backported the new feature to phpbu 4.0.8
You can use it with a configuration like this.

<phpbu>
<backups>
  <backup name="foo">
    <source type="tar">
      <option name="path" value="/dir/to/compress"/>
      <option name="compressProgram" value="lbzip2"/>
    </source>
    <target dirname="backup/src" filename="backup-%Y%m%d-%H%i.tar" compress="bzip2"/>
  </backup>
</backups>
</phpbu>

This should result in a tar command like this

tar --use-compress-program='lbzip2' -cf backup/src/backup20170329-1500.tar.bz2 -C '/dir/to' 'compress'

Hope that helps

Cheers Sebastian

Owner

sebastianfeldmann commented Mar 29, 2017

I just backported the new feature to phpbu 4.0.8
You can use it with a configuration like this.

<phpbu>
<backups>
  <backup name="foo">
    <source type="tar">
      <option name="path" value="/dir/to/compress"/>
      <option name="compressProgram" value="lbzip2"/>
    </source>
    <target dirname="backup/src" filename="backup-%Y%m%d-%H%i.tar" compress="bzip2"/>
  </backup>
</backups>
</phpbu>

This should result in a tar command like this

tar --use-compress-program='lbzip2' -cf backup/src/backup20170329-1500.tar.bz2 -C '/dir/to' 'compress'

Hope that helps

Cheers Sebastian

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