s2pdump(1) General Commands Manual s2pdump(1)

s2pdump - SCSI/SASI hard/tape drive dump/restore tool

s2pdump [--all-luns/-a] [--board-id/-B BOARD_ID] [--buffer-size/-b BUFFER_SIZE] [--help/-H] [--id/-i ID[:LUN]] [--image-file/-f IMAGE_FILE] [--inquiry/-I ID[:LUN]] [--log-level/-L LOG_LEVEL] [--overwrite/-o] [--restore/-r] [--retries/-R RETRIES] [--scan] [--scsi-generic/-g DEVICE_FILE] [--sector-count/-c COUNT] [--software-handshake/-S] [--start-sector/-s START] [--version/-v]

s2pdump dumps or restores storage devices like hard drives, magneto-optical drives or tapes. Dump mode can also be used with read-only media such as CD-ROM/DVD drives. When working with devices managed by the Linux SG driver, s2pdump can be used on any Linux system, not just on a Pi.

When operating in dump mode, s2pdump copies all data from a remote drive to an image on the local filesystem. Optionally it generates a properties file, e.g. for /etc/s2p.conf. This file can be used to more closely emulate the source drive. When used with a tape drive, the data is dumped in a SIMH-compatible format.

In restore mode s2pdump copies the data from a local image to a remote physical drive. The remote drive must be writable. Restoring a tape drive expects a SIMH-compatible file.

s2pdump requires a FULLSPEC PiSCSI/RaSCSI board.

To use the generated drive image with SCSI2Pi, it should usually be moved to the drive image folder.

Check all LUNs during a bus scan. The default is to scan LUN 0 only. If the target device supports the REPORT LUNS SCSI command, s2pdump uses this command to optimize the scan.
SCSI ID of the SCSI2Pi board. If not specified, ID 7 is used. The SCSI2Pi host will be functioning as the "initiator" device. Not relevant for SASI.
The transfer buffer size in bytes. The default size is 1 MiB, the minimum size is 64 KiB.
Display this help.
ID and optional LUN of the SCSI or SASI target drive.
Path of the source/destination image file.
Display INQUIRY data of ID[:LUN] and (SCSI only) device properties for use with property files, e.g. /etc/s2p.conf.
Set the log level (trace, debug, info, warning, error, critical, off). The default log level is 'warning'.
In restore mode, overwrite an existing file.
Run in restore mode. The default is dump mode.
Set the number of retries when dumping/restoring a disk drive, default is 0.
Scan the bus for SCSI and SASI devices and display their properties.
Use the Linux SG driver with the specified device file instead of a RaSCSI/PiSCSI board.
Only for hard drives, not for tape drives: sector count for the dump/restore operation. For SCSI drives, the default is the capacity reported by the drive. For SASI drives, s2pdump determines the capacity using the method of interval nesting. You can pass an explicit sector count to override this capacity.
On the Pi5, use a software handshake (slower) instead of a hardware handshake. Mainly for testing purposes.
Only for hard drives, not for tape drives: start sector for the dump/restore operation, the default is 0.
Display the s2pdump version.

Dump Mode: [SCSI/SASI Drive] ---> [SCSI2Pi host] Launch s2pdump to dump all data from the drive with SCSI ID 3 with a dump buffer size of 128 KiB. Store it on the local filesystem as a drive image named out_image.hds.
s2pdump -i 3 -f out_image.hds -b 131072

Restore Mode: [SCSI2Pi host] ---> [SCSI/SASI hard drive or SCSI tape drive] Launch s2pdump to restore/upload a drive image from the local file system to SCSI ID 0 with a restore buffer size of 1 MiB:
s2pdump -r -i 0 -f in_image.hds -b 1048576

s2p(1), s2pctl(1), s2pexec(1), s2pformat(1), s2pproto(1), s2psimh(1), s2ptool(1)

Also see <https://www.scsi2pi.net> and <https://github.com/uweseimet/scsi2pi>.