Skip to content

Native Windows port #936

Closed
Closed

Description

@ThomasWaldmann

If borg could run directly on a normal Windows installation (via cmd, not requiring cygwin or other major runtime support), it could be useful for windows machines that do not have cygwin installed.

Notes:

Doing a native windows port is likely quite some work over a longer time, due to all the differences between windows and UNIX-like operating systems. Whether it can be done in a pretty (regarding to source code changes) and good working (regarding to practical use) way has to be seen.

Because of that, it will have to live in a separate branch of the repository at first (which should be regularly updated from master branch, so it is kept up-to-date and without potential merge conflicts).

At some time in the future, that branch might or might not get merged into master.


💰 there is a bounty for this

I opened a (first) bounty for this - if you would like to see this happen, feel free to support this or a future, related bounty.

The goal and scope of this bounty is:

  • have a borg codebase that is able to run on native windows (without cygwin or similar runtime requirements)
  • working basic borg commands: init, create, list, extract, delete
  • working unit tests (failures in some of them that test stuff not in scope of the bounty are acceptable)
  • initial documentation for developers and users (how to set up dev environment, how to install on a user system)
  • not required: encryption, special windows file attributes support (like ACLs, xattrs), VSS support, installer

Activity

  1. changed the title [-]Native Windows port?[/-] [+]Native Windows port[/+] on Apr 18, 2016
  2. ThomasWaldmann commented on Apr 19, 2016

    @ThomasWaldmann
    MemberAuthor

    See PR #947 (has been merged into "windows" branch now).

    Superceded by: #986 (has been merged into "windows" branch now).

  3. ThomasWaldmann commented on Apr 25, 2016

    @ThomasWaldmann
    MemberAuthor

    Thanks to @Anakonda for doing the native windows port!

    The basics work, but it will for sure need more testing, fixes and enhancements - please file tickets for anything that shows up (make sure you mention "windows branch" for problems only happening in that branch).

  4. henfri commented on Aug 27, 2017

    @henfri
    Contributor

    Hello,

    I would like to try borg under Windows.
    I am aware of the standalone installer using cygwin. But for the project, I think testing of the native windows port would be useful, don't you think?

    Is there any documentation on the native port? E.g. what python packages are needed.
    For another project I use cx_freeze to freeze to create an executable. That would certainly help on this respect. What do you think?

    Regards,
    Hendrik

  5. henfri commented on Aug 27, 2017

    @henfri
    Contributor

    Hello,

    I just saw that an executable is already created here:
    https://github.com/borgbackup/borg/blob/windows/deployment/windows/buildwin32.py

    That's good. Before deploying borg as native executable, an installer would be even better, but for testing, it is not needed I think.

    If you would like people to test the native windows, I think that a compiled version of this branch would be needed. Is that available from somewhere?

    Regards,
    Hendrik

  6. Anakonda commented on Aug 27, 2017

    @Anakonda
  7. Neurrone commented on Aug 27, 2017

    @Neurrone

    @Anakonda is this a native windows port, or does it install sigwin?

  8. henfri commented on Aug 27, 2017

    @henfri
    Contributor

    Cygwin, you mean?
    By the looks it is the native built and does not need cygwin

    Greetings,
    Hendrik

  9. Neurrone commented on Aug 27, 2017

    @Neurrone

    @henfri thanks. Will try it, curious to see how it stacks up against rclone and duplicati

  10. henfri commented on Aug 27, 2017

    @henfri
    Contributor

    Hello,

    no, it does not run. It is missing ctypes.wintypes:

    from .windows import acl_get, acl_set
    File "src\borg\platform\windows.pyx", line 13, in init borg.platform.windows (src/borg/platform\windows.c:8460)
    ImportError: No module named 'ctypes.wintypes'

    Greetings,
    Hendrik

  11. Anakonda commented on Aug 27, 2017

    @Anakonda

    Here is working one: https://www.dropbox.com/s/tolumpufc179j77/borg.zip?dl=0
    I will do pull request later.

  12. 49 remaining items

  13. ThomasWaldmann commented on Mar 21, 2019

    @ThomasWaldmann
    MemberAuthor

    the code should be reviewed by somebody with a clue of win32 api.

    if it is unclear to @Anakonda what's unclean/unfocussed, i can point at it, but it might be rather obvious.

  14. henfri commented on Mar 21, 2019

    @henfri
    Contributor

    Hello,

    I reviewed this one:
    126921d
    which is the initial commit.
    What I see that could be unclean is:

    • UID/GID set to 0
    • Mix of changes to make compatible to windows AND changes in order to be able to compile/install.

    Apart from that, I do not see anything that could break functionality on non win32 platforms and nothing that would be 'dirty'.

    Greetings,
    Hendrik

  15. Anakonda commented on Mar 21, 2019

    @Anakonda

    I suggest that we forget the windows branch for now, it is no way mergeable with master, instead start making (very) small changes to master.
    Maybe get pip install -e . to pass as first commit.

  16. luke-jr commented on Apr 24, 2019

    @luke-jr
    Contributor

    Can AppVeyor be restarted to regenerate the Windows builds? Presumably it's better than nothing?

  17. TheRealAlexV commented on Oct 4, 2021

    @TheRealAlexV

    Would also like to see a windows version

  18. z11k commented on Nov 18, 2022

    @z11k

    +1 for win build

  19. maxkratz commented on May 26, 2023

    @maxkratz

    +1

  20. SpiderUnderUrBed commented on Jul 21, 2024

    @SpiderUnderUrBed

    +1

  21. SpiderUnderUrBed commented on Jul 24, 2024

    @SpiderUnderUrBed

    @ThomasWaldmann @henfri
    I am getting the FD exception problem, is there any way to fix that? like what ssh params can I change, and can this be fixed in windows/borg by any means?

  22. KraXen72 commented on Dec 21, 2025

    @KraXen72

    +1 for a windows build, at least restoring/browsing backups would be awesome! Thanks!

  23. ThomasWaldmann commented on Dec 23, 2025

    @ThomasWaldmann
    MemberAuthor

    A windows build needs a windows maintainer (and there currently is no active developer doing this).

    A good start would be working on fixing / reactivating windows CI (that's also where the build happens, after the tests).

  24. KraXen72 commented on Dec 24, 2025

    @KraXen72

    Maybe someone from the BorgBase/Vorta team would be interested in getting backups restorable on windows?

    i'm sure it'd be a nice peace of mind knowing that i can simply borrow a friends windows machine and get to my data. I understand that this can be currently solved with WSL or a remote backup location (on a server), but i believe my point still stands.

  25. ThomasWaldmann commented on Jan 28, 2026

    @ThomasWaldmann
    MemberAuthor

    @KraXen72 you need to file that in the vorta issue tracker.

  26. ThomasWaldmann commented on Jan 28, 2026

    @ThomasWaldmann
    MemberAuthor

    Update for this ticket:

    I re-activated CI testing for windows in master branch after fixing some issues that made it fail. master branch will become borg 2 at some time in the future, but is not yet ready for production.

  27. KraXen72 commented on Jan 28, 2026

    @KraXen72

    Thanks for the updates, and thanks for maintaining borg. good luck with ongoing borg2 development!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions