Who can truly say that they never wished for a way to write files to two places at the same time?! No I’m not talking about setting up a complete Ceph cluster or, god forbids, DRDB. Just something simple that double the writes to two different folders.

I stumbled over this problem again a few weeks ago when I was trying to write config files to a distributed filesystem but wanted to always keep an updated copy on a local one. After searching through the internet for a while without finding any tool that writes to two backing directories, I had one of these how-hard-can-this-be moments and redirected my research towards figuring out how to write a FUSE filesystem in Python.

I found the most simple one on stavros.io and started to adjust it so that it can handle two backends.
Another close example can be found in the python corner.

Turns out it’s not that hard at all to write a simple filesystem and I put the result on
github.com/benibr/dupfs
.

A teacher of mine once said
Everybody should take pitcher of beer or wine and calculate the field axioms from scratch.
but I would rather say, everyone should write a filesystem once in a lifetime :)