github marcpope/borg-windows v1.4.4-win6

latest releases: v1.4.5-win1, v1.4.4-win7
5 months ago

Borg Backup 1.4.4 - Native Windows Build (Preview 6)

Cancel / force-kill now reliably kills the ssh child

Previous Windows builds spawned ssh.exe with CREATE_NEW_PROCESS_GROUP so that Ctrl+C wouldn't corrupt borg's shutdown — but that also meant a parent supervisor cancelling or force-killing borg would leave ssh.exe orphaned, holding the network connection and the server-side lock until its I/O timed out (sometimes minutes).

This release wraps ssh.exe in a Windows Job Object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE. When borg.exe exits for any reason — clean shutdown, unhandled exception, CTRL_BREAK_EVENT, or an external force-kill — Windows terminates ssh.exe automatically. No more orphans.

CTRL_BREAK_EVENT now exits cleanly

A parent process sending CTRL_BREAK_EVENT to borg previously hit Python's default handler and skipped finalizers. borg now installs a SIGBREAK handler that raises SigTerm, so cancel flows through the normal orderly-exit path (same as SIGTERM on POSIX). Used by tools like the BBS agent to cancel running backups.

Safer RemoteRepository.close() teardown

close() now closes stdin first (to give the server a real EOF), waits up to 30s with a kill() fallback, joins the Windows reader threads, then closes stdout/stderr. This prevents an abortive pipe shutdown from racing the server's commit and leaving the server-side lock.exclusive behind after a warning-exit borg create. Relevant to marcpope/borgbackupserver#91.

Merged upstream BorgBackup 1.4.4

This release incorporates all of upstream borg 1.4.4, including:

  • hashindex memory leak fix (#9497)
  • hashindex HashHeader validation (#9485)
  • hashindex_size 64-bit fix (#9423)
  • PyInstaller SSL fix (#9196)
  • argparse.FileType Python 3.14 compatibility (#9266)
  • test_with_lock race fix (#8810)
  • cwd-in-archive feature (#6191)
  • prune -v/--info output (#9262)
  • Padmé obfuscation UI

⚠ SSH client requirement

Some versions of the Windows built-in OpenSSH client (C:\Windows\System32\OpenSSH\ssh.exe) have a subprocess-stdin forwarding bug that causes borg to hang indefinitely when talking to a remote borg serve. Symptom: borg init or borg create over ssh://... hangs with no output after the SSH connection establishes.

Workaround: 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'

See README_WINDOWS.md for details.

All changes in this Windows fork (cumulative):

  • Native Windows NTFS ACL backup/restore (SDDL-based)
  • MSVC build support
  • Remote SSH repository support on Windows
  • Forward-slash path normalization in archives (cross-platform portable)
  • Drive letter stored as first path component (e.g. C/Users/...)
  • --strip-components and pattern matching fixed for Windows paths
  • Windows cancel/force-kill reliability (v1.4.4-win6)

What does NOT work:

  • borg mount (no FUSE on Windows — use borg extract or borg export-tar)
  • xattrs, BSD flags, special files (not applicable on Windows)

Usage:

Download and extract borg-windows.zip. Run borg.exe from the extracted folder. No Python installation required.

Don't miss a new borg-windows release

NewReleases is sending notifications on new releases.