A utility for one-way synchronisation of a local folder with a folder on a remote machine. When you delete a file or folder in a local folder, the deletion does not occur in the deleted folder (as an option). Perfect for mirroring data.
- Cloning the repository
git clone https://github.com/abataloff/docker-lsyncd.git
- Configuration
- Rename the lsyncd/lsyncd.config.example file to lsyncd.config
- Set the hostname of the remote host in the parameter sync.host in lsyncd.config
- Set the path to directory on remote host in the parameter sync.targetdir in lsyncd.config
- Set path to local directory as volume (./data:/data) in docker-compose file
- Create the folder keys with ssh private key for autorization on remote host (he should be without a password and with permission 600)
- Create the known_hosts file in keys
- Run container
docker-compose up -d