Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


WARNING: This code is not stable yet. Do not use it unless you know what you are doing.

btrsync is a program to synchronize files between two hosts, with detection of move operations.

There are two independent implementations: one in Haskell and one in Python. The Haskell implementation is not stable and is documented in a separate section. The rest of this document describes the Python implementation.

Credits and license

The Python implementation of btrsync is (C) 2012 Fabrice Ben Hamouda and Antoine Amarilli.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program (see file "COPYING"). If not, see


Install python-argparse and python-gmpy, install btrsync on both hosts, and ensure that:

  • either all *.py files are in the PATH of both hosts.
  • or is in the PATH of both hosts and the other *.py files are in the PYTHONPATH of both hosts


You should not run directly. Please always run

For help, run: -h


Unit tests are provided. To run them:

cd tests


You can benchmark btrsync against rsync with the script. Run it thus:

./ FROM TO >> results

This will run btrsync and rsync, compare their results, and write to results a line with the following format:

FROM TO txbtrsync rxbtrsync txrsync rxrsync diff tbtrsync trsync

The two first columns are the source and destination, the four next columns are the number of bytes sent and received by btrsync and rsync, the diff column is the total number of bytes exchanged by rsync minus the total number of bytes exchanged by btrsync, the two last columns are the total running times in milliseconds.

If btrsync and rsync fail to yield the same result, will exit.


Unit tests are provided. To run them:

cd tests

Haskell implementation

Remember that this implementation is not stable and should not be used directly.

To install for the current user only: sudo apt-get install haskell-platform (can vary depending on your package manager. We actually only depend on GHC and Cabal) cabal update cabal install

To install for all users, replace "cabal install" by "sudo cabal install --global")

To use, see btrsync --help.


A version of rsync that is intelligent enough to detect simple moves. Done in a team as part of the course "Informatique scientifique par la pratique"







No releases published


No packages published