new: sata-to-nvme
This commit is contained in:
10
2025-11-13-sata-to-nvme/0001-transfer.sh
Normal file
10
2025-11-13-sata-to-nvme/0001-transfer.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
SOURCE_DISK=/dev/nvme0n1p2
|
||||||
|
OUTPUT_IMAGE_PATH=/x/sata1/snapshots/nvme-old-1tb.zst
|
||||||
|
TRANSFER_SIZE=436G
|
||||||
|
|
||||||
|
sudo partclone.ntfs -c -s $SOURCE_DISK -o - \
|
||||||
|
| pv -s $TRANSFER_SIZE -pterb \
|
||||||
|
| zstd -T0 -19 -o $OUTPUT_IMAGE_PATH
|
||||||
|
|
||||||
6
2025-11-13-sata-to-nvme/README.md
Normal file
6
2025-11-13-sata-to-nvme/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# SATA to NVME session
|
||||||
|
|
||||||
|
## Goal
|
||||||
|
- Move all data in NTFS partition `/dev/nvme0n1p2` to `/x/sata1/snapshots`.
|
||||||
|
- Use partclone and zstd for the best efficiency.
|
||||||
|
|
||||||
21
2025-11-13-sata-to-nvme/REVIEW.md
Normal file
21
2025-11-13-sata-to-nvme/REVIEW.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
## 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.
|
||||||
Reference in New Issue
Block a user