Files
sysadmin-sessions/2025-11-13-sata-to-nvme/REVIEW.md
2025-11-13 20:36:46 +09:00

22 lines
892 B
Markdown

## Script Review: 0001-transfer.sh
**Purpose:** Creates a compressed backup image of an NTFS partition using partclone and zstd compression.
**Key Components:**
- **Source:** `/dev/nvme0n1p2` (NTFS partition)
- **Output:** `/x/sata1/snapshots/nvme-old-1tb.zst` (compressed image)
- **Transfer Size:** 436G (used for progress monitoring)
**Pipeline:**
1. `partclone.ntfs -c -s $SOURCE_DISK -o -` - Clones NTFS partition to stdout
2. `pv -s $TRANSFER_SIZE -pterb` - Monitors progress with visual feedback (progress, time, rate, bytes)
3. `zstd -T0 -19 -o $OUTPUT_IMAGE_PATH` - Compresses with max compression (level 19) using all CPU threads
**Notes:**
- Requires `sudo` privileges
- Uses maximum compression (`-19`) for best space efficiency
- Multi-threaded compression (`-T0`) for faster processing
- Progress bar provides real-time feedback during the long-running operation
Let's go.