Skip to content

Installing BorgBackup for Windows

Marc Pope edited this page Aug 13, 2026 · 3 revisions

This page covers installing the native Windows build of BorgBackup and the few things that work differently from official BorgBackup on other platforms — mainly how drive letters are stored and how to restore files to their original location.

For everything else (creating repositories, backup schedules, pruning, encryption, compression, all commands), use the official BorgBackup documentation: https://borgbackup.readthedocs.io/en/1.4-maint/ — this fork tracks upstream 1.4.x and behaves identically except where noted below.


Installation

  1. Download borg-windows.zip from the latest release.
  2. Extract it into a folder of your choice, e.g. C:\Program Files\BorgBackup. The zip contains borg.exe and an _internal\ folder at its top level, and the result is fully self-contained — no Python installation is required.
  3. (Optional) Add that folder to your PATH:
    [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\BorgBackup", "User")
  4. Verify it runs:
    borg --version

SmartScreen note: the executable is not code-signed, so Windows may show a SmartScreen warning on first run. Choose "More info" → "Run anyway".

Remote repositories over SSH — important

Borg on Windows talks to remote repositories by spawning an ssh client. Some versions of the Windows built-in OpenSSH (C:\Windows\System32\OpenSSH\ssh.exe) have a stdin-forwarding bug that makes borg hang forever after connecting. Install Git for Windows and point borg at its bundled ssh:

$env:BORG_RSH = '"C:\Program Files\Git\usr\bin\ssh.exe" -o BatchMode=yes'

Remote repository URLs use the standard borg syntax, e.g. ssh://user@host//absolute/path/to/repo. Local repositories work with normal Windows paths (C:\path\to\repo).

How Windows paths are stored in archives

This is the main difference from official borg. Paths are stored with forward slashes, and the drive letter becomes the first path component:

On disk Stored in archive
C:\Users\me\file.txt C/Users/me/file.txt
D:\Data\db.mdf D/Data/db.mdf

This keeps archives portable across operating systems and preserves drive identity in multi-drive backups. borg list shows the stored form.

Restoring files

borg extract restores into the current directory (same as official borg). Because the drive letter is a path component, a plain extract of C:\Users\me lands in .\C\Users\me\....

Restoring in place

To restore files to their original location, change to the drive root and strip the drive-letter component with --strip-components 1 — this is the only way to restore data in place:

cd C:\
borg extract --strip-components 1 REPO::ARCHIVE

Restoring a subtree

Add the archived path (including the drive component, forward slashes) to limit what is extracted:

cd C:\
borg extract --strip-components 1 REPO::ARCHIVE C/Users/me/Documents

Restoring somewhere else

Just extract in any directory without --strip-components and you get the full C\Users\... tree there, or use a higher strip count to cut deeper prefixes (components are counted on the stored path: C/Users/me/file.txt with --strip-components 3 extracts as file.txt).

NTFS permissions (ACLs)

File owner, group, and DACL are backed up automatically (as SDDL) and restored on extract. Full owner/group restore requires the SE_RESTORE_NAME privilege — run borg elevated (as Administrator) when restoring if you need original ownership; otherwise borg silently falls back to restoring the DACL only.

What does not work on Windows

  • borg mount — FUSE does not exist on Windows; use borg extract or borg export-tar instead.
  • POSIX extended attributes (xattrs), BSD file flags.
  • Special files (block/char devices, FIFOs, sockets).

Everything else

All other commands and concepts are unchanged from official BorgBackup — see the official documentation and the quickstart guide. For build-from-source instructions and the full list of Windows-specific changes, see README_WINDOWS.md.