Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use multithread compressor #87

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

Use multithread compressor #87

mudragel opened this issue Mar 8, 2017 · 6 comments
Assignees

Comments

@mudragel
Copy link

@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
Copy link
Owner

@sebastianfeldmann 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
Copy link
Author

@mudragel 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
Copy link
Owner

@sebastianfeldmann sebastianfeldmann commented Mar 8, 2017

Currently there is now way to do so :/

@mudragel
Copy link
Author

@mudragel mudragel commented Mar 8, 2017

It will be a cool feature!

@sebastianfeldmann
Copy link
Owner

@sebastianfeldmann sebastianfeldmann commented Mar 8, 2017

Definitely ;)

sebastianfeldmann added a commit that referenced this issue Mar 29, 2017
@sebastianfeldmann sebastianfeldmann modified the milestone: Version 5.0.0 Mar 29, 2017
@sebastianfeldmann
Copy link
Owner

@sebastianfeldmann 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.