1. Installation

To install the provided binary, simply copy rdiff-backup.exe to someplace in your PATH. Everything is included in the binary (including Python) for local operation. For remote operation, you will need to install a Windows SSH program. You will also need to install rdiff-backup on the remote system(s).

Note
you might want to enable long paths support in Windows 10 v1607 or later. A simple alternative from the command line is to query the long path support with reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled (the result will be 0x0 for disabled or 0x1 for enabled), and enable it with reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f.

2. Additional Issues

2.1. include and exclude paths

Currently, rdiff-backup's --include and --exclude options do not support Windows paths with \ as the directory separator. Instead, it is necessary to use / which is the Unix directory separator.

2.2. Too old version of Windows

If trying to start rdiff-backup, you get a dialog:

The program can’t start because api-ms-win-core-path-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.

And then on the command line something like:

Error loading Python DLL 'C:\Users\myuser\AppData\Local\Temp\_MEI395202\python39.dll LoadLibrary: The specified module could not be found.

Then you’re most probably running a version of Windows not supported by the version of Python embedded in rdiff-backup.exe. The release notes and/or the installation instructions should give you the necessary information, else check the Python for Windows download page.

3. Troubleshooting

If you have everything installed properly, and it still doesn’t work, see the enclosed manual, FAQ, the web page at https://rdiff-backup.net, and/or the mailing list. You can subscribe to the mailing list at: https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users

You can also try searching the mailing list archives: https://lists.nongnu.org/archive/html/rdiff-backup-users/

4. Tips and Tricks

4.1. Using Putty as SSH client

If you have Putty installed (and configured) and don’t want to fiddle with OpenSSH, add the following parameter to your rdiff-backup call:

--remote-schema "plink.exe -i D:\backup-key.ppk -batch %s rdiff-backup server"
  • -batch avoids having to press enter to open the session

  • -i lets you specify a puttygen-generated private key

4.2. Using Microsoft’s OpenSSH client on Windows 10

If rdiff-backup can’t seem to find the native SSH client offered by Windows, even if it is definitely in your PATH (as proven by where ssh), and even if you use the full path C:\Windows\System32\OpenSSH\ssh.exe, it’s most probably because you’re using the 32 bits version of rdiff-backup on a 64 bits Windows, they just don’t see this path.

You have two solutions:

  1. install the 64 bits version of rdiff-backup.

  2. add the remote schema option to your call of rdiff-backup with something like --remote-schema "C:\Windows\SysNative\OpenSSH\ssh.exe %s rdiff-backup server" (adding the path to the front of your PATH environment variable might also be an option).

4.3. Create a bat script to call rdiff-backup

Create a file rdiff-backup.bat somewhere in your PATH. The content can be as simple as the following:

C:\FULLPATH\rdiff-backup.exe -v5 -b --exclude-globbing-file "%~dpn0.txt" source target

so that you can put your exclusion patterns in a file called rdiff-backup.txt placed in the same directory as your bat-script.

Tip
if you set the remote-schema in your bat-script, don’t forget to duplicate the percentage sign to %%s, so that the bat-interpreter doesn’t "interpret" it as variable.