Add --no-ui flag

This commit is contained in:
2026-10-02 13:09:40 +03:00
parent a013ec6131
commit 1f580ae150
2 changed files with 28 additions and 4 deletions
+24 -1
View File
@@ -43,7 +43,26 @@ chmod +x migrate.sh
```
Data lands under `/mnt/stor0/qnap/<nas-name>/<share-name>/`. Per-share rsync logs are written to
`/mnt/stor0/qnap/_logs/`.
`/mnt/stor0/qnap/_logs/`; script messages go to `_logs/migrate.log` while the dashboard is shown.
### Progress dashboard
On a terminal, one block per QNAP is shown (also with `--jobs N`):
```
qnap1 share Photos 3/12 (copying)
File [##########--------------------] 34% 12.3MB/s
Total [######------------------------] 21% 4.2GB / 20.0GB, 183 files
> Photos/2023/IMG_0042.jpg
```
- `File` is the file currently being copied; `Total` is the current share (sized by a dry-run scan before each share, so large shares pause briefly while "scanning").
- Plain rsync output is used instead with `--dry-run`, `--list-only`, non-terminal output, or when an `smb` entry uses `-` (interactive password prompt).
### Stopping
Ctrl+C (or `kill`) stops all rsync/ssh/smbclient processes, unmounts temporary CIFS/NFS mounts and closes SSH connections.
The SSH method reuses one multiplexed connection per NAS, so a key passphrase is asked only once.
## Options
@@ -55,6 +74,10 @@ Data lands under `/mnt/stor0/qnap/<nas-name>/<share-name>/`. Per-share rsync log
| `--jobs N` | Number of NAS devices to process in parallel (default 1) |
| `--dry-run` | Pass `--dry-run` to rsync, no changes made |
| `--list-only` | Only discover and print shares, don't transfer |
| `--no-ui` | Disable the progress dashboard, use plain rsync output |
QNAP system folders (`@Recycle`, `.@__thumb`, `.system`, snapshots, etc.) are skipped automatically.
Re-running the script is safe/idempotent — rsync only copies new or changed files.
If the files were edited on Windows, strip CRLF line endings on TrueNAS before running:
`sed -i 's/\r$//' migrate.sh generate_ssh_keys.sh nas_list.conf`