borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
11.11k stars 740 forks source link

import-tar: create archive from tarball #2233

Closed enkore closed 3 years ago

enkore commented 7 years ago

Split from #176

ThomasWaldmann commented 7 years ago

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

enkore commented 7 years ago

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 commented 7 years ago

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

guillaume-uH57J9 commented 7 years ago

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 commented 4 years ago

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 commented 3 years ago

@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 commented 3 years ago

https://github.com/borgbackup/borg/issues/2233#issuecomment-283155479 about being "untangled":

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 commented 3 years ago

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:

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