A next-generation sync client that unifies multiple S3 storage backends under a virtual filesystem with intelligent tag-based organization and dynamic filtering.
Warning
This project is currently in early development and is not ready for production use.
Core components like the gRPC server, testing infrastructure, and production storage backends are incomplete.
Do not attempt to use this in any production or critical environment.
This README.md, as well as all docs have been created with AI.
Since the project is still in its initial state with everything open to changes.
GoSync is an agent-based sync client that creates a unified virtual filesystem across multiple S3-compatible storage backends (MinIO, AWS S3, Backblaze B2, etc.) while solving the fundamental limitation of hierarchical filesystems. Through a powerful tag-based organization system and dynamic filters, files can be organized by unlimited dimensions simultaneouslyโlike smart playlists for your entire storage infrastructure. Files are stored once but accessible through multiple logical views, with seamless synchronization between local paths, physical backends, and filtered collections.
- Why GoSync?
- Key Features
- Architecture Overview
- Quick Start
- Core Concepts
- Usage Examples
- Installation
- Configuration
- Command Reference
- Use Cases
- Development
- Roadmap
- Contributing
- License
Traditional filesystems force you to choose one location for each file:
Where should vacation-sunset.jpg live?
/photos/2024/vacation/?
/photos/red-sunsets/?
/photos/favourites/?
You can only pick ONE, but it belongs to ALL of them!
Existing solutions either:
- Duplicate files across folders (wasting space)
- Use symbolic links (breaks on different systems)
- Lock you into proprietary clouds (vendor lock-in)
- Force hierarchical thinking (limiting organization)
GoSync provides:
- โ Virtual filesystem unifying multiple S3 backends
- โ Tag-based organization enabling multi-dimensional views
- โ Dynamic filters that automatically update
- โ Smart mirroring syncing filtered collections
- โ Self-hosted with no vendor lock-in
- โ Files stored once but accessible through unlimited views
- Unified namespace across multiple S3-compatible backends
- Dynamic provisioning of storage backends at runtime
- Cross-backend operations like mirroring and syncing
- Transparent multi-cloud mixing AWS, Backblaze, MinIO, etc.
- Unlimited tags per file with key-value pairs
- Multi-dimensional access to the same file
- No duplication - files exist once, accessible everywhere
- Auto-tagging from EXIF, AI, file metadata
- Query-based virtual paths like smart playlists
- Real-time evaluation as tags change
- Complex queries with AND/OR/NOT logic
- Cross-backend filtering across all storage
- Bidirectional sync between any path types
- Filter mirroring syncing filtered collections locally
- Backend-to-backend for automated backups
- Selective sync no forced full downloads
- SQLite for simple single-user deployments
- PostgreSQL for multi-client coordination
- Redis cache for performance optimization
- Encrypted credentials for security
- Single binary for agent and CLI
- Unix socket RPC for command communication
- Service container with dependency injection
- Systemd integration for daemon operation
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Virtual Filesystem โ
โ โ
โ / โ
โ โโโ selfhosted/ โโ Physical Backends โ
โ โ โโโ pictures/ โ
โ โ โโโ documents/ โ
โ โโโ aws/ โ
โ โ โโโ backups/ โ
โ โโโ backblaze/ โ
โ โ โโโ cold-storage/ โ
โ โโโ filters/ โโ Dynamic Query Views โ
โ โโโ pictures/ โ
โ โ โโโ red/ [tag:colour=red] โ
โ โ โโโ vacation/ [tag:event=vacation] โ
โ โ โโโ favourites/ [tag:rating>=4] โ
โ โโโ work/ โ
โ โโโ urgent/ [tag:priority=high] โ
โ โโโ active/ [tag:status=active] โ
โ โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Metadata Database + Tag System โ
โ โ
โ โข File metadata (size, dates, checksums) โ
โ โข Tags (key-value pairs per file) โ
โ โข Filter definitions (query expressions) โ
โ โข Sync states (per client, per backend) โ
โ โข Backend configurations (encrypted credentials) โ
โ โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Physical S3 Backends โ
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ MinIO โ โ AWS S3 โ โ Backblaze โ โ
โ โ (Local) โ โ (Cloud) โ โ B2 โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ
โ Files stored as-is, tags in metadata only โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Download latest release
curl -L https://github.com/mwantia/gosync/releases/latest/download/gosync -o gosync
chmod +x gosync
sudo mv gosync /usr/local/bin/
# Or build from source
git clone https://github.com/mwantia/gosync
cd gosync
task build# Generate default config
gosync config init
# Edit configuration
nano ~/.gosync/config.yaml# Start agent daemon
gosync agent --config ~/.gosync/config.yaml &
# Or install as systemd service
sudo cp gosync.service /etc/systemd/system/
sudo systemctl enable gosync
sudo systemctl start gosync# Add a local MinIO instance
gosync provision selfhosted \
--endpoint localhost:9000 \
--bucket sync-bucket \
--access-key minioadmin \
--secret-key minioadmin \
--no-ssl
# List backends
gosync ls# Sync local folder to backend
gosync mirror ~/Documents selfhosted/documents
# Check sync status
gosync sync statePhysical storage locations (S3-compatible):
gosync provision selfhosted --endpoint localhost:9000 --bucket sync
gosync provision aws --endpoint s3.amazonaws.com --bucket backup
gosync provision b2 --endpoint s3.us-west-002.backblazeb2.com --bucket archiveAccess via: selfhosted/path, aws/path, b2/path
Key-value metadata attached to files:
# Add tags
gosync tag add selfhosted/photo.jpg \
colour=red event=vacation year=2024 rating=5
# Search by tags
gosync tag search colour=red year=2024Dynamic virtual paths based on queries:
# Create filter
gosync filter create filters/photos/red \
--filter "tag:colour=red"
# List matches (updates automatically)
gosync ls filters/photos/red
# Mirror filtered collection
gosync mirror ~/Desktop/RedPhotos filters/photos/redBidirectional mirroring between paths:
# Local โ Backend
gosync mirror ~/Documents selfhosted/docs
# Backend โ Backend
gosync mirror-remote selfhosted/important aws/backup/important
# Filter โ Local (dynamic!)
gosync mirror ~/Favourites filters/photos/favourites# Provision storage
gosync provision photos --endpoint s3.amazonaws.com --bucket my-photos
# Sync photos from camera
gosync mirror ~/Pictures/Camera photos/camera
# Auto-tag with AI
gosync tag auto photos/camera/ --ai-labels
# Create filters
gosync filter create filters/photos/vacation --filter "tag:event=vacation"
gosync filter create filters/photos/family --filter "tag:people contains 'family'"
gosync filter create filters/photos/red --filter "tag:colour=red"
gosync filter create filters/photos/best --filter "tag:rating>=4"
# Mirror favourites locally
gosync mirror ~/Desktop/BestPhotos filters/photos/best
# Browse by any dimension
gosync ls filters/photos/vacation
gosync ls filters/photos/family
gosync ls filters/photos/red# Provision work backend
gosync provision work --endpoint company-minio:9000 --bucket work-docs
# Sync local documents
gosync mirror ~/Documents work/documents
# Tag documents
gosync tag add work/documents/contract.pdf \
category=legal priority=high project=alpha status=active
# Create smart folders
gosync filter create filters/work/urgent \
--filter "tag:priority=high AND tag:status=active"
gosync filter create filters/work/project-alpha \
--filter "tag:project=alpha"
# Mirror urgent items to desktop
gosync mirror ~/Desktop/Urgent filters/work/urgent# Provision multiple backends
gosync provision primary --endpoint minio.local:9000 --bucket sync
gosync provision backup --endpoint s3.amazonaws.com --bucket backup
gosync provision archive --endpoint b2.backblazeb2.com --bucket cold
# Tag files by importance
gosync tag add primary/critical/* backup=critical
gosync tag add primary/important/* backup=important
gosync tag add primary/normal/* backup=normal
# Create priority filters
gosync filter create filters/backup/critical --filter "tag:backup=critical"
gosync filter create filters/backup/important --filter "tag:backup=important"
# Set up cascading backups with different frequencies
gosync mirror-remote filters/backup/critical backup/hourly
gosync mirror-remote filters/backup/important backup/daily
gosync mirror-remote filters/backup/normal archive/weekly# Provision media storage
gosync provision media --endpoint s3.amazonaws.com --bucket media-library
# Tag media files
gosync tag add media/movies/*.mkv quality=4k year=2024
gosync tag add media/movies/scifi/* genre=scifi
# Create quality filters
gosync filter create filters/movies/4k --filter "tag:quality=4k"
gosync filter create filters/movies/scifi --filter "tag:genre=scifi"
gosync filter create filters/movies/recent --filter "tag:year>=2020"
# Mirror to Plex library
gosync mirror /mnt/plex/4k filters/movies/4k
gosync mirror /mnt/plex/scifi filters/movies/scifi- Go 1.24 or later (for building from source)
- S3-compatible storage (MinIO, AWS S3, Backblaze B2, etc.)
- PostgreSQL or SQLite for metadata storage
- (Optional) Redis for caching
# Download latest release
curl -L https://github.com/mwantia/gosync/releases/latest/download/gosync-linux-amd64 -o gosync
chmod +x gosync
sudo mv gosync /usr/local/bin/# Clone repository
git clone https://github.com/mwantia/gosync
cd gosync
# Install dependencies
go mod download
# Build
go build -o gosync cmd/gosync/main.go
# Or use Task
task build# Run with Docker
docker run -d \
--name gosync \
-v /path/to/config:/config \
-v /path/to/data:/data \
gosync/gosync:latest# Copy service file
sudo cp gosync.service /etc/systemd/system/
# Edit configuration path
sudo nano /etc/systemd/system/gosync.service
# Enable and start
sudo systemctl enable gosync
sudo systemctl start gosync
# Check status
sudo systemctl status gosyncdata_dir: ~/.gosync
metadata:
type: sqlite
sqlite:
path: ~/.gosync/metadata.db
encrypt:
secret: "your-32-character-secret-key!"
s3:
# Default S3 config (optional)
endpoint: localhost:9000
bucket: default-sync
log:
level: infodata_dir: /var/lib/gosync
metadata:
type: postgres
postgres:
host: localhost
port: 5432
database: gosync
user: gosync
password: ${POSTGRES_PASSWORD}
sslmode: require
cache:
enabled: true
redis:
host: localhost
port: 6379
password: ${REDIS_PASSWORD}
db: 0
ttl: 5m
encrypt:
secret: ${ENCRYPT_SECRET}
sync:
interval: 60s
workers: 4
chunk_size: 5MB
log:
level: info
file: /var/log/gosync/gosync.log
rotation:
max_size: 100
max_backups: 5
max_age: 30
compress: trueSee Configuration Guide for full options.
gosync agent [--config <path>] # Start agent daemon
gosync config init # Initialize configuration
gosync config validate # Validate configuration
gosync version # Show versiongosync vfs ls [path] # List filesystem contents
gosync vfs ls # List all backends
gosync vfs ls selfhosted # List backend contents
gosync vfs ls selfhosted/pictures # List specific path
gosync vfs ls filters/photos/red # List filter results
gosync vfs ls -lh selfhosted/pictures # Long format, human-readablegosync provision <id> [options] # Add S3 backend
gosync backend list # List all backends
gosync backend show <id> # Show backend details
gosync backend update <id> [options] # Update backend
gosync backend remove <id> # Remove backend
gosync scan <backend-id> # Scan backend metadatagosync tag add <path> <key>=<value>... # Add tags to file
gosync tag list <path> # List file tags
gosync tag remove <path> <key>... # Remove tags
gosync tag search <key>=<value>... # Search by tags
gosync tag auto <path> [--exif|--ai] # Auto-tag filesgosync filter create <path> --filter <query> # Create filter
gosync filter list # List all filters
gosync filter show <path> # Show filter details
gosync filter update <path> --filter <query> # Update filter
gosync filter delete <path> # Delete filter
gosync filter test <query> # Test filter querygosync mirror <local> <virtual> # Create sync mirror
gosync mirror-remote <src> <dst> # Mirror between backends
gosync sync state [name] # Show sync status
gosync sync list # List all syncs
gosync sync pause <name> # Pause sync
gosync sync resume <name> # Resume sync
gosync sync remove <name> # Remove sync- Organize 50,000+ photos by multiple dimensions
- Auto-tag with AI for people, objects, scenes
- Create smart collections (vacation, family, red, etc.)
- Mirror favourites locally without duplication
- Multi-dimensional filing (project, priority, status)
- Smart folders for active work items
- Automatic backup of critical documents
- Team collaboration with shared metadata
- Tag by quality, genre, year, language
- Smart libraries for Plex/Jellyfin
- Automatic organization as content is added
- Multi-tier storage (hot/warm/cold)
- Tag files by importance and frequency
- Tiered backup to different providers
- Automated cascading backups
- Cost optimization with filter-based routing
- Organize datasets by experiment, date, type
- Track analysis status with tags
- Automatic archival of completed work
- Collaborative access with shared storage
# Clone repository
git clone https://github.com/mwantia/gosync
cd gosync
# Install Task (build tool)
go install github.com/go-task/task/v3/cmd/task@latest
# Install dependencies
task setup
# Build
task build
# Run tests
task test
# Run with test config
task rungosync/
โโโ cmd/gosync/ # Main application entry point
โ โโโ main.go
โ โโโ cli/ # CLI commands
โโโ internal/
โ โโโ agent/ # Agent daemon
โ โโโ config/ # Configuration management
โ โโโ client/ # RPC client
โโโ pkg/
โ โโโ backend/ # Backend registry
โ โโโ metadata/ # Metadata store abstraction
โ โโโ storage/ # S3 storage engines
โ โโโ cache/ # Redis cache layer
โ โโโ log/ # Logging service
โ โโโ filter/ # Filter query engine
โโโ docs/ # Documentation
โโโ config.yaml # Example configuration
โโโ Taskfile.yml # Build tasks
โโโ README.md
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
- Agent architecture with service container
- Virtual filesystem foundation
- Backend registry system
- SQLite metadata storage
- PostgreSQL metadata storage
- Redis cache layer
- Backend provisioning and management
- Cross-backend operations
- Tag CRUD operations
- Tag indexing and search
- Bulk tagging operations
- Auto-tagging (EXIF, AI)
- Filter query engine
- Filter CRUD operations
- Real-time filter evaluation
- Filter performance optimization
- Bidirectional sync
- Filter-aware mirroring
- Conflict resolution
- Progress tracking
- Web UI for management
- Mobile clients
- Selective sync
- File versioning
- Share links
- Bandwidth management
Q: How is this different from Rclone?
A: Rclone provides low-level sync between remotes. GoSync adds a unified virtual filesystem, tag-based organization, and dynamic filtering across all backends. You can organize files by multiple dimensions without duplication.
Q: Do I need to migrate my existing S3 data?
A: No! GoSync works with files as-is on S3. Just provision the backend and scan to populate metadata. Tags are stored separately.
Q: Can I use multiple databases?
A: Yes! Use SQLite for single-user, PostgreSQL for multi-client coordination. Both work with the same agent.
Q: How do filters stay up-to-date?
A: Filters are evaluated in real-time from the metadata database. When tags change, filter results automatically update.
Q: Can I mirror between filters?
A: Filters are read-only query views, but you can mirror them to local paths or physical backends. Perfect for smart collections!
Q: Is there a web UI?
A: Not yet, but it's on the roadmap. Currently CLI and agent-based.
Q: How are credentials secured?
A: All S3 credentials are encrypted at rest using AES-256 with your configured encryption key.
GoSync is released under the Apache License 2.0.
- Built with fabric service container
- Inspired by smart playlists, Gmail labels, and the need for better file organization
- Thanks to the Go community for excellent S3 libraries
For issues and questions:
- Open an issue on GitHub
- Check existing issues for solutions
- Review logs at
~/.minio-sync/
Note: This is a True Sync Client that maintains a full local copy. For large datasets where you don't need all files locally, consider implementing selective sync (planned feature).