Skip to content

Add Rclone storage backend with WebDAV support #86

Description

@borg-codex-bot

Goal

Add a new generic rclone storage type to Borg Backup UI. The first supported backend should be WebDAV for providers such as Nextcloud, ownCloud and other WebDAV-compatible services.

BorgBackup does not support WebDAV directly. When rclone is available on the Unraid host, Borg Backup UI should mount the remote target locally with rclone mount and let Borg use the mounted path as a local repository target.

Requirements

Storage type

  • Add a new storage type: rclone.
  • Support at least the backend webdav initially.
  • Keep the design generic enough to add later rclone backends such as S3, Backblaze B2, Google Drive, OneDrive or Dropbox.

WebDAV profile

A WebDAV profile should support:

  • profile display name
  • WebDAV URL
  • username
  • password or secret
  • optional remote path
  • optional certificate verification setting
  • optional additional rclone options

Secrets must not be stored in plain text in normal configuration files. They must use the existing secret handling model.

Prerequisite checks

When creating or testing a profile, check:

  • rclone is installed
  • rclone version works
  • FUSE or mount support is available
  • target URL is reachable
  • authentication works
  • remote path is readable and writable

Missing prerequisites must produce clear user-facing error messages.

Mount behavior

Before a backup, mount the target with rclone, for example below:

/tmp/borg-backup-ui/mounts/<storage-id>

or another comparable temporary mount path.

After the backup, unmount cleanly.

The implementation must handle:

  • existing mounts
  • mount conflicts
  • locking
  • cleanup after failures
  • mount operation timeouts
  • useful logs
  • no secrets in logs

Borg integration

After a successful mount, Borg should access the repository as a local path, for example:

borg create /tmp/borg-backup-ui/mounts/<storage-id>/<repository> ...

The existing backup flow should change as little as possible. Rclone/WebDAV should be added as another storage abstraction.

Storage UI test

The Storage page should provide a test action for Rclone/WebDAV profiles. The test should verify:

  • rclone availability
  • connection and login
  • mount success
  • write test
  • unmount success

Results must be understandable in the UI.

UI requirements

Add a selectable storage type, preferably Rclone, with backend selection WebDAV initially.

The UI must clearly explain that this feature requires rclone and mount/FUSE support on the host.

Logging

Log relevant steps:

  • rclone checks
  • temporary rclone config creation
  • mount attempts
  • connection tests
  • Borg access
  • unmount
  • cleanup
  • error details

Passwords, tokens and secrets must never appear in logs.

Acceptance criteria

  • A WebDAV target can be created as a new Rclone storage profile.
  • The connection can be tested from the UI.
  • BorgBackup can use a repository on the mounted WebDAV target.
  • The mount is removed reliably after backup completion.
  • UI and logs show understandable errors.
  • Secrets are handled safely and never logged.
  • The implementation is prepared for additional rclone backends.

Implementation note

Build this as a generic rclone storage type and treat WebDAV as the first backend, not as a hard-coded one-off WebDAV integration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    impact::user-visibleVisible effect for plugin usersrelease-note::yesInclude in user-facing release notestype::featureNew user-facing or plugin feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions