whoops; missed this function call
Write to persist file if it's empty
Added ssl error for debugging and made certs last longer
Decentralized file syncing daemon
Syncd is meant to run on any type of computer: mobile, desktop, server. It can run as a client instance or a server instance. Both instances may run on the same machine. The client instance connects to one or more remote server instances, and compares files. Syncd fill in missing files, updates changed files, and deletes files as well. In order to know whether to delete a file, syncd keeps a persistent cache of file modification times. If the file is in the cache, but not in the file system, syncd assumes the file has been deleted.
Dependencies:
# Use gmake on FreeBSD
make
sudo make install
make setup-linux
make enable-client-linux
make enable-server-linux
These commands add a default configuration file to ~/.config/syncd
and add systemd client and server units to ~/.config/systemd/user
. The client is triggered by a systemd timer that runs every 5 minutes. You can also run the client by running syncd
. The server is a systemd daemon. You can run the server manually with syncd --server
.
If you need to reinstall syncd while the server is running, use make install-linux-server
.
gmake setup-freebsd
sudo gmake enable-server-freebsd
These commands do the same as the Linux versions with the following differences:
sudo gmake install-freebsd-service
The default configuration location is ~/.config/syncd/config
. If you want to use a different configuration file, specify it as a command-line argument to syncd. Enter the certs
directory and run make
if you need to generate a key/cert pair or a password. Configuration options are explained in the following sample configuration files:
There should only be at most one Server
entry, and there can be any number of Host
entries. The Server
entry is only used when syncd is run as a server (syncd --server
), and the Host
entries are only used when syncd is run as a client (syncd
). There should be one or more Dir
entries. These are the actual directories that are syncd. The directory must have the same name on the server and client, but it does not need to have the same path.
If you use this project, I'd love to hear your feedback! Send me mail at robert at increscent dot org.