From 04d351a859725776e04832cc9adabbe8faab92d878b2f29126951687affbd415 Mon Sep 17 00:00:00 2001 From: Thomas Oettli Date: Mon, 24 Aug 2026 01:07:11 +0200 Subject: [PATCH] add WSL section to README.md --- README.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca8d81b..f273e7e 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ them out. Any command it does not implement itself is passed straight through to ## Requirements -- A Debian-based host with `bash` and `curl` — a Debian-based WSL instance works as well, - which lets you back up Windows directories through `/mnt/c` +- A Debian-based host with `bash` and `curl` - `jq` and `proxmox-backup-client` — both installed by `pbc install` - 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 ``` +## 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 GPLv3 — see [LICENSE](LICENSE).