Skip to content

BackendError: File or folder already exists #98

@mlell

Description

@mlell

I have setup borg 2.0.0.b14 with an rclone remote that in turn uses the PCloud service. Repository version: 3; Append only: False; Encrypted: Yes (repokey ChaCha20-Poly1305)

I encounter the following error:

Local Exception

Error:

BackendError: rclone rc command failed: error 500: {
	"error": "failed to make directory: pcloud error: File or folder already exists. (2004)",
	"input": {
		"fs": "pcloud:User/Backup/borg/",
		"remote": "data/ff/a2"
	},
	"path": "operations/uploadfile",
	"status": 500
}

The error does not happen again when restarting the backup but it might crash later due to the same error but for a different folder within data/.... Logging in to the PCloud web interface, I saw that the mentioned folder (data/ff/a2) is empty.

Further log output:

``` If reporting bugs, please include the following:

Traceback (most recent call last):
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/init.py", line 636, in main
exit_code = archiver.run(args)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/init.py", line 530, in run
rc = func(args)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/_common.py", line 176, in wrapper
return method(self, args, repository=repository, **kwargs)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 268, in do_create
create_inner(archive, cache, fso)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 169, in create_inner
self._rec_walk(
~~~~~~~~~~~~~~^
path=path,
^^^^^^^^^^
...<12 lines>...
strip_prefix=strip_prefix,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 527, in _rec_walk
self._rec_walk(
~~~~~~~~~~~~~~^
path=normpath,
^^^^^^^^^^^^^^
...<12 lines>...
strip_prefix=strip_prefix,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 527, in _rec_walk
self._rec_walk(
~~~~~~~~~~~~~~^
path=normpath,
^^^^^^^^^^^^^^
...<12 lines>...
strip_prefix=strip_prefix,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 527, in _rec_walk
self._rec_walk(
~~~~~~~~~~~~~~^
path=normpath,
^^^^^^^^^^^^^^
...<12 lines>...
strip_prefix=strip_prefix,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
[Previous line repeated 8 more times]
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 467, in _rec_walk
status = self._process_any(
path=path,
...<7 lines>...
strip_prefix=strip_prefix,
)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archiver/create_cmd.py", line 284, in _process_any
return fso.process_file(
~~~~~~~~~~~~~~~~^
path=path,
^^^^^^^^^^
...<5 lines>...
strip_prefix=strip_prefix,
^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archive.py", line 1388, in process_file
self.process_file_chunks(
~~~~~~~~~~~~~~~~~~~~~~~~^
item,
^^^^^
...<3 lines>...
backup_io_iter(self.chunker.chunkify(None, fd)),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archive.py", line 1149, in process_file_chunks
chunk_entry = chunk_processor(chunk)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/archive.py", line 1139, in chunk_processor
chunk_entry = cache.add_chunk(chunk_id, {}, data, stats=stats, wait=False, ro_type=ROBJ_FILE_STREAM)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/cache.py", line 894, in add_chunk
self.repository.put(id, cdata, wait=wait)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borg/repository.py", line 474, in put
self.store.store(key, data)
~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borgstore/store.py", line 208, in store
self.backend.store(self.find(name), value)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borgstore/backends/rclone.py", line 247, in store
self._rpc("operations/uploadfile", None, tries=self.TRIES, params=params, files=files)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Computer/borg/lib/python3.13/site-packages/borgstore/backends/rclone.py", line 165, in _rpc
r = self._requests(requests.post, self.url + command, json=json_input, **kwargs)
File "/home/user/Computer/borg/lib/python3.13/site-packages/borgstore/backends/rclone.py", line 155, in _requests
raise err
borgstore.backends.errors.BackendError: rclone rc command failed: error 500: {
"error": "failed to make directory: pcloud error: File or folder already exists. (2004)",
"input": {
"fs": "pcloud:User/Backup/borg/",
"remote": "data/ff/a2"
},
"path": "operations/uploadfile",
"status": 500
}

Platform: Linux moes 6.13.7-arch1-1 borgbackup/borg#1 SMP PREEMPT_DYNAMIC Thu, 13 Mar 2025 18:12:00 +0000 x86_64
Linux: Unknown Linux
Borg: 2.0.0b14 Python: CPython 3.13.2 msgpack: 1.0.5 fuse: None [pyfuse3,llfuse]
PID: 124346 CWD: /home/User
sys.argv: ['/home/user/.bin/borg', 'create', '--list', '--stats', '--exclude-from', '.borgignore', '-C', 'zstd,4', 'User::20250323-1351', '/home/user/./']
SSH_ORIGINAL_COMMAND: None

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions