# usync
Sync any two paths with each other & cloud backup.
Uses `unison` to sync the paths, rclone to sync to a cloud provider.
## Setup
```bash
git clone && cd usync
just install-deps
rclone config
# Edit justfile: set SOURCE, TARGET, and CLOUD_REMOTE variables
just setup
```
## Use
```bash
just sync-paths # Between paths (SOURCE and TARGET in justfile)
just sync-cloud # To cloud
just status # Check
```
## Commands
- `setup` - Create directories
- `check` - Verify paths
- `sync-paths` - Fast sync (unison)
- `sync-cloud` - Cloud backup (rclone)
- `status` - Show state
## Windows
For cloud backup from Windows, use rclone directly:
### Install
rclone for Windows: https://rclone.org/downloads/
### Setup
```powershell
rclone config # Configure your cloud remote
```
### Run
```powershell
# Replace paths with your Windows drive letter and configured remote name
rclone sync -P "H:\usync" "your-remote:/usync"
```
## Configure
Edit justfile:
- SOURCE/TARGET - paths to sync (e.g. /mnt/drive1)
- CLOUD_REMOTE - rclone remote name (e.g. cloud_remote:)
- CLOUD_PATH - cloud folder (default: /usync)
- CLOUD_MOUNT_PATH - local mount (e.g. /home/user/cloud-mount)