You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -34,7 +37,7 @@ You can also run `./setup-alias.sh` from the repo to add the alias for you.
34
37
35
38
## Features
36
39
37
-
-**Backup**: Multi-directory, full/incremental/differential, quick backup (default from menu), compression (gzip/pigz), excludes `node_modules`. Each `.tar.gz` is self-contained: extracting creates a single top-level folder with everything inside. Quick backup shows live per-folder progress (same dashboard as interactive).
40
+
-**Backup**: Multi-directory, full/incremental/differential, quick backup (default from menu), compression (gzip/pigz). **`node_modules` is never included** in backups to save space; you can rebuild dependencies after restore with `yarn install` or `npm install`. Each `.tar.gz` is self-contained: extracting creates a single top-level folder with everything inside. Quick backup shows live per-folder progress (same dashboard as interactive).
38
41
-**Restore**: With integrity validation (tar + SHA256); optional `--skip-verify`
39
42
-**Reporting**: HTML reports, email, charts (gnuplot), backup comparison
|**Linux (Ubuntu)**| Same commands; uses GNU tools (`stat -c`, `date -d`, etc.) |
97
+
|**WSL2**| Same as Linux; use `/mnt/c`, `/mnt/d` etc. for Windows drives (see **Paths by platform** below) |
98
+
99
+
-**Compatibility check:**`./verify-implementation.sh` confirms config, first-run, and OS-specific paths (e.g. `get_file_size_bytes`, `run_with_timeout`, tar flags). It reports macOS or Linux and suggests next steps.
100
+
-**Quick smoke test:**`./backup.sh --quick --dry-run` shows the backup dashboard and a simulated run without writing files.
101
+
102
+
The app uses `uname -s` to choose the right commands (e.g. BSD vs GNU `find`, `stat` vs `du`, `date -r` vs `date -d`).
103
+
104
+
## Exclusions and what’s included
89
105
90
-
-**macOS / Linux / WSL2:** Run `./run-tests.sh` (no config required; uses test directories). All 41 tests should pass.
91
-
-**Compatibility check:** Run `./verify-implementation.sh` to confirm config, first-run, and OS-specific paths (e.g. `get_file_size_bytes`, `run_with_timeout`, tar flags). It reports macOS or Linux and suggests next steps.
92
-
-**Quick smoke test:**`./backup.sh --quick --dry-run` should show the backup dashboard and a simulated run without writing files.
106
+
-**`node_modules`** – Excluded from all backups (full, incremental, differential, and quick) to **save space**. Dependencies are easy to rebuild after restore: run `yarn install` or `npm install` in each project directory. Exclusion is verified by the integration test suite.
93
107
94
-
On WSL2, use `/mnt/<letter>/` for Windows drives (see **Paths by platform** in Configuration). The app uses `uname -s` to choose the right commands (e.g. BSD vs GNU `find`, `stat` vs `du`).
108
+
-**Always included** (so you can reconstruct the app after restore): **`.env`** (and common variants like `.env.local`), **`yarn.lock`**, and **npm lockfiles** (`package-lock.json`, `npm-shrinkwrap.json`) are *not* excluded. With these in the backup, a restore plus `yarn install` or `npm install` reproduces the same dependency tree and environment.
95
109
96
110
## Configuration
97
111
@@ -128,6 +142,37 @@ All command-line options pass through to the alias. Dry-run only checks that sou
128
142
2.**`./secure-secrets.sh`** – set up credential storage
129
143
3.**`./security-audit.sh`** – checks permissions, sensitive files in git, hardcoded credentials, eval, temp files (also runs with `./run-tests.sh`)
130
144
145
+
## Pull Request Checklist
146
+
147
+
Use this checklist before opening or merging a PR:
148
+
149
+
-[ ] Ran `./run-tests.sh` locally and all suites passed.
150
+
-[ ] Ran `./security-audit.sh` and it reported no issues.
151
+
-[ ] Verified on at least one target platform (`macOS` or `Ubuntu/WSL2`).
152
+
-[ ] If shell scripts changed, ensured `bash -n` passes.
153
+
-[ ] Updated `README.md` or docs for any behavior/CLI changes.
154
+
-[ ] Confirmed no secrets were added (especially `secrets.sh`, `.env`, credentials).
155
+
156
+
CI (`.github/workflows/ci.yml`) enforces syntax checks and full tests on macOS and Ubuntu.
157
+
158
+
## Contributing
159
+
160
+
Before opening a PR, run the local quality gate:
161
+
162
+
```bash
163
+
./run-tests.sh && ./security-audit.sh
164
+
```
165
+
166
+
Recommended when changing shell scripts:
167
+
168
+
```bash
169
+
find . -type f -name "*.sh" -exec bash -n {} \;
170
+
```
171
+
172
+
If your change affects platform-specific behavior, validate at least one of:
173
+
- macOS
174
+
- Ubuntu Linux (or WSL2 Ubuntu)
175
+
131
176
**What's hardened:**
132
177
- All temp files use `mktemp` (no `/tmp/` predictable paths in active code)
133
178
-`umask 027` in utils, encryption, and setup scripts
@@ -144,6 +189,7 @@ Full details: [docs/SECURITY_REVIEW.md](docs/SECURITY_REVIEW.md)
144
189
|--------|--------|
145
190
|`webdev-backup.sh`| Main menu |
146
191
|`backup.sh`, `restore.sh`, `quick-backup.sh`| Backup and restore |
192
+
|`prune-backups.sh`| Prune old backups (keep 5 latest or delete one by one) |
147
193
|`config.sh`, `utils.sh`, `fs.sh`, `ui.sh`| Config and shared modules |
# Generate HTML report (skip in dry-run). Create when interactive, email requested, or when showing progress (e.g. --quick) so "view report" can be offered.
0 commit comments