This application provides a bucket synchronisation service that provides a way to automatically download files to a local folder as they appear in a remote bucket, or to automatically upload files to a remote bucket or WebDAV server from a local folder as they are written to it.
- Push synchronisation: Watches for local file system changes in specified locations and synchronises new or updated files to a specified bucket or WebDAV server.
- Pull synchronisation: Can process S3 upload event notifications from a message queue, downloading new or updated files to the local machine.
- Multiple Storage Backends: Supports both S3-compatible storage (MinIO, AWS S3) and WebDAV servers.
- Secure Protocols: Supports both HTTP (
webdav://) and HTTPS (webdavs://) WebDAV connections. - Custom Filtering: (TODO) Ability to process the file with a script before upload/download, which useful for removing or obfuscating sensitive data.
To use the bucket synchronisation service, follow these steps:
- Storage access: Ensure that buckets exist in your cloud storage solution and that you have S3-compatible credentials with appropriate access, OR ensure you have WebDAV server access with valid credentials.
- Message queue access: If you are configuring a pull synchronisation, you will also need to ensure the service has access to the relevant virtualhost and queue.
- Configure Service: Configure the service by providing details about your storage solution. See
example/config.yaml. - Start Service: Ensure the service is started and runs in the background. You can do this with a user-based
systemctlconfiguration.
For S3-compatible storage (AWS S3, MinIO, etc.), use URLs in the format:
s3://endpoint.com/bucket-name/path
Configure S3 credentials in the remotes section of your config file.
For WebDAV servers, use URLs in the format:
webdav://username:[email protected]/path # HTTP
webdavs://username:[email protected]/path # HTTPS (secure)
WebDAV credentials are embedded directly in the URL. No separate remote configuration is needed.
WebDAV Features:
- Automatic directory creation on the remote server
- Support for both HTTP and HTTPS connections
- Username/password authentication
- Compatible with popular WebDAV servers (Apache, nginx, Nextcloud, etc.)
Copy the [example/bucketsyncd.service] systemd unit file to your home directory as ~/.config/systemd/user/bucketsyncd.service. Update it to reflect the locations of where your binary and configuration files are.
Then:
systemctl --user enable bucketsyncdCheck it's running as expected.
systemctl --user status bucketsyncdTo contribute to the bucket synchronisation service, follow these steps:
- Fork Repository: Fork the repository on GitHub.
- Create Pull Request: Create a pull request with your changes.
- Review Changes: Review changes and provide feedback to other contributors.
The bucket synchronisation service is licensed under the MIT license, which allows for free use and modification of the software.