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

import-tar: create archive from tarball #2233

Closed
enkore opened this issue Feb 28, 2017 · 8 comments · Fixed by #5650
Closed

import-tar: create archive from tarball #2233

enkore opened this issue Feb 28, 2017 · 8 comments · Fixed by #5650
Assignees

Comments

@enkore
Copy link
Contributor

enkore commented Feb 28, 2017

Split from #176

@enkore enkore self-assigned this Feb 28, 2017
@ThomasWaldmann
Copy link
Member

Note: should be done after 1.2, borg is expected to be more modular / untangled by then.

@enkore
Copy link
Contributor Author

enkore commented Feb 28, 2017

This is pretty simple actually, since the model used by the various tar's is fairly close to what Borg does. (Also, the stdlib tarfile module handles all the dirty work for us). See PR, not much code.

@enkore
Copy link
Contributor Author

enkore commented Apr 3, 2017

#2234 is the implementation PoC for this that can be recycled later for a real implementation.

@guillaume-uH57J9
Copy link

I am looking for a way to transfer an archive between borg repositories. My use case is syncing a local and remote repository.

By gluing together tar import + tar export I could transfer archives between repositories, and move toward my goal.

@enkore enkore removed their assignment Oct 14, 2017
@ThomasWaldmann ThomasWaldmann added this to the 1.1.x milestone Feb 11, 2019
@ThomasWaldmann ThomasWaldmann changed the title create archive from tarball import-tar: create archive from tarball Nov 4, 2019
@enkore
Copy link
Contributor Author

enkore commented Mar 27, 2020

Oof, I actually thought this was merged back then and I was so confused why import-tar seemingly vanished from the CLI and the docs.

@ceriath
Copy link

ceriath commented Jan 25, 2021

@enkore so what is happening with this, will it be merged/reimplemented? Is there any way to restore a backup from an exported tar with borg?

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Jan 25, 2021

#2233 (comment) about being "untangled":

  • there was some recent work in master branch that split file discovery and file processing.
  • also there is code now getting a list of files from stdin and feeding that into file processing.

So there has been a bit work in this direction, but not yet at the right place needed for import-tar (like having some in-memory object having all the metadata and data and giving that to "put that into this archive code").

@ThomasWaldmann
Copy link
Member

The implementation is now merged to master branch and everybody interested is invited to help with some practical testing.
I personally did not do much practical testing, but I implemented a little test coverage by automated tests, but not very much.

See borg help import-tar and borg help export-tar. Also see there about current limitations (== what is expected to not work).

Stuff to test:

  • 0 bytes, mid-sized, huge files
  • char/block device files, fifos
  • hardlinks and symlinks
  • uncompressed, misc. compressions
  • inputs created by borg export-tar, inputs create by other tar software
  • misc. error conditions, interruptions

Please open new issues if you find bugs or ask here if you have questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants