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

borg2: borg transfer fails with zlib compressed archive in borg 1.x repo #7883

Closed
ticpu opened this issue Oct 24, 2023 · 1 comment
Closed
Assignees
Labels

Comments

@ticpu
Copy link

ticpu commented Oct 24, 2023

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

BUG

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

❯ borg -V
borg 2.0.0b7

Operating system (distribution) and version.

Arch Linux

Hardware / network configuration, and filesystems used.

It is an external USB disk with a btrfs GPT partition with default options. Btrfs scrub reports no error.

How much data is handled by borg?

Around 1.5TB.

Full borg commandline that lead to the problem (leave away excludes and passwords)

❯ borg --repo /mnt/custom/borg2 transfer --other-repo /mnt/backups/borg --compress=zstd,10 --recompress=always --upgrader=From12To20

Describe the problem you're observing.

borg transfer from old repo to new is failing with an AssertError. The new repo was created using
borg --repo /mnt/custom/borg2 rcreate --other-repo=/mnt/backups/borg -e repokey-aes-ocb

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

Yes, everytime I run the transfer command without --dry-run
Since the exception contains messages about cache, I tried rm -rf ~/.cache/borg and it doesn't help.

Include any warning/errors/backtraces from the system logs

downloads-2018-01-05 01:43:44.712277: archive is already present in destination repo, skipping.
home-2018-01-05 11:20:02.644243: copying archive to destination repo...
Local Exception

Error:

AssertionError: 

If reporting bugs, please include the following:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/borg/archiver/__init__.py", line 630, in main
    exit_code = archiver.run(args)
                ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver/__init__.py", line 536, in run
    return set_ec(func(args))
                  ^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver/_common.py", line 223, in wrapper
    return method(self, args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver/_common.py", line 156, in wrapper
    return method(self, args, repository=repository, cache=cache_, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver/transfer_cmd.py", line 131, in do_transfer
    chunk_entry = cache.add_chunk(
                  ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/cache.py", line 954, in add_chunk
    cdata = self.repo_objs.format(id, meta, data, compress=compress, size=size, ctype=ctype, clevel=clevel)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/repoobj.py", line 40, in format
    assert isinstance(meta, dict)
AssertionError

Platform: Linux p4 6.5.1.arch1.r1204752.b56e84bccab0 #1 SMP PREEMPT_DYNAMIC Mon, 25 Sep 2023 01:09:30 +0000 x86_64
Linux: Unknown Linux  
Borg: 2.0.0b7  Python: CPython 3.11.5 msgpack: 1.0.5 fuse: llfuse 1.5.0 [pyfuse3,llfuse]
PID: 3900158  CWD: /mnt/backups
sys.argv: ['/usr/bin/borg', '--repo', '/mnt/custom/borg2', 'transfer', '--other-repo', '/mnt/backups/borg', '--compress=zstd,10', '--recompress=always', '--upgrader=From12To20']
SSH_ORIGINAL_COMMAND: None
@ThomasWaldmann ThomasWaldmann added this to the 2.0.0rc1 milestone Oct 24, 2023
@ThomasWaldmann ThomasWaldmann self-assigned this Oct 24, 2023
@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Oct 24, 2023

What kind(s) of compression did you use in the old repo (for archive home-2018-01-05 11:20:02.644243)?

Did you use the obfuscation feature?

Update: guess it was legacy zlib compression (which was kind of a special case and there is a bug dealing with that). see fix in #7884.

@ThomasWaldmann ThomasWaldmann changed the title Borg2 fails with AssertionError in add_chunk during borg transfer borg2: borg transfer fails when transferring a zlib compressed archive from borg 1.x repo Oct 24, 2023
@ThomasWaldmann ThomasWaldmann changed the title borg2: borg transfer fails when transferring a zlib compressed archive from borg 1.x repo borg2: borg transfer fails with zlib compressed archive in borg 1.x repo Oct 24, 2023
@ThomasWaldmann ThomasWaldmann removed this from the 2.0.0rc1 milestone Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants