aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: dd64cdfc5a25c1bd3a5294586ea8b7b9fdda3ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# usync

<img src="logo.png" width="120" markdown="1">

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 <repo> && 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)