add WSL section to README.md

This commit is contained in:
2026-08-24 01:07:11 +02:00
parent d5d4ea2430
commit 04d351a859
+30 -2
View File
@@ -10,8 +10,7 @@ them out. Any command it does not implement itself is passed straight through to
## Requirements ## Requirements
- A Debian-based host with `bash` and `curl` — a Debian-based WSL instance works as well, - A Debian-based host with `bash` and `curl`
which lets you back up Windows directories through `/mnt/c`
- `jq` and `proxmox-backup-client` — both installed by `pbc install` - `jq` and `proxmox-backup-client` — both installed by `pbc install`
- A reachable PBS with a datastore and an API token - A reachable PBS with a datastore and an API token
@@ -239,6 +238,35 @@ cp -a /mnt/restore/etc/nginx /etc/nginx
umount /mnt/restore umount /mnt/restore
``` ```
## Running in WSL
`pbc` also works inside a Debian-based WSL instance, which makes it a way to back up
Windows directories: the Windows drives show up under `/mnt`, so they can be listed in
`BACKUP` like any other path.
```bash
BACKUP=('users.pxar:/mnt/c/Users' 'projects.pxar:/mnt/d/projects')
```
A few things to keep in mind:
- Access to files under `/mnt` is governed by Windows, not by the user you are inside the
WSL instance — `sudo` does not help there. To back up paths your Windows user cannot
read, start the WSL instance itself as administrator (run the terminal or `wsl.exe` via
*Run as administrator*), then run `pbc` in it.
- The owner and permission metadata stored in the archive is the one WSL synthesizes for
Windows files, not the original Windows ACLs.
- Cron is not running in a WSL instance by default, so `backup-cron` only fires if you
enable it — either by starting `cron` yourself, or by triggering `pbc backup-cron` from
the Windows Task Scheduler with `wsl.exe`:
```
wsl.exe -d Debian -u root /usr/local/bin/pbc backup-cron
```
For the reason above, such a task has to run with highest privileges to reach files that
are not accessible to your Windows user.
## License ## License
GPLv3 — see [LICENSE](LICENSE). GPLv3 — see [LICENSE](LICENSE).