I am trying to two-way sync my NAS (running Lubuntu) from my local network to a remote server (running Debian) with Unison CLI. I was using Unison before syncing my laptops files directly with the remote server. I always get an issue when trying to sync files from my NAS to my server:
Invalid argument: index out of bounds
Does anybody know why this happens? Is there a problem because Debian and Ubuntu are using not the exactly same version of Unison?
Edit: So in addition to making sure the Unison version numbers match and that the same version of OCaml was used to compile (as I said in my original answer below), there is one more thing necessary to get Unison working on your Banana Pi: compile it into bytecode, not native code. It turns out that (for whatever reason) Unison doesn't compile properly into native code for ARM processors like what the Banana (and my Raspberry) Pi have.
If you download a pre-compiled version of Unison it should work fine, but if you compile yourself, be sure to add the line Native=false
to the Unison Makefile.
According to the unison manual:
It is important that the version of Unison installed on the server machine is the same as the version of Unison on the client machine.
This is because they change the format of the archive file in practically every update. You can check your version with unison -version
. Update unison (or build/install it from source) to ensure your versions match, and then edit your post if you still have the same problem.
In some cases it also turns out to be important that unison is built using the same version of OCaml. I'm using Unison version 2.40.63 and I've had to build using OCaml 3.12.1 to avoid issues.