SHA256
add WSL section to README.md
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user