ocs-onthefly(8) Clonezilla Manual ocs-onthefly(8)

ocs-onthefly - Clonezilla: on-the-fly disk or partition(s) cloning

ocs-onthefly [OPTION]

ocs-onthefly is used for "disk to disk" or "partition to partition" clone on-the-fly, either locally or over the network.

Run program in batch mode (dangerous!), i.e., without any prompt or wait for confirmation.
Do the files checksum inspection for cloned files in destination devices.
Specify the target device as DEV (e.g., /dev/sdb or sdb).
Force to change the CHS (cylinders, heads, sectors) value of NTFS boot partition after cloning. NTFS-BOOT-PARTITION can be "auto" or a device name.
Force to use the CHS from EDD (Enhanced Disk Device) when creating partition table by sfdisk.
Resize the file system size to fit the partition size in the destination disk.
Specify the source device as DEV (e.g., /dev/sda or sda).
Install grub in the MBR. GRUB_PARTITION can be "auto" or a device name.
Use the PROGRAM (gzip, lzop, bzip2, xz, lz4, zstd, cat) before sending partition data to netcat/nuttcp (only in network clone mode). Default is zstd.
Do not show GUI (TUI), use text only.
Turn on rescue mode, i.e., try to skip bad sectors.
Remove the NTFS volume dirty flag in source NTFS file system before cloning it.
Skip removing the Linux udev hardware records on the restored GNU/Linux.
Skip updating syslinux-related files on the restored GNU/Linux.
Skip updating initramfs file(s) on the restored GNU/Linux.
Skip checking destination disk size before creating the partition table.
Skip updating boot entries in EFI NVRAM after cloning.
Do NOT create partition table in boot sector in target machine.
Create partition table based on the partition table from the source (default).
Create partition table in the target disk proportionally.
Enter command line prompt to create partition table manually before cloning.
Use dd to clone the image of the data between MBR (1st sector) and 1st partition.
Do NOT clone boot loader.
Force to use the saved CHS (cylinders, heads, sectors) when using sfdisk.
Force to use sector-by-sector copy (slow but works for all filesystems).
Specify the netcat port (only in network clone mode).
Action when cloning finishes: [choose|poweroff|reboot|true|CMD].
Specify the running machine is the network clone server.
Specify the source IP address (used in target client machine).
Do NOT restore the MBR.
Restore the prebuilt bootloader from syslinux (For Windows only).
Do NOT restore the EBR.
Prints verbose information.
Use PROGRAM as network pipe program. Available: netcat, nuttcp.
Interactive mode.
Run in beginner mode (shortcut for "-um beginner").
Run in expert mode (shortcut for "-um expert").
Specify the user mode.
Enable the direct IO mode of Partclone for NVMe SSD.

1. To clone local sda to local sdb:

ocs-onthefly -f sda -d sdb

2. To clone sda from machine A (IP 192.168.100.1) to sda on machine B via network:

On machine A:

ocs-onthefly -a -f sda

On machine B:

ocs-onthefly -s 192.168.100.1 -d sda

/etc/drbl/drbl-ocs.conf
The configuration file for Clonezilla.

ocs-sr(8), drbl-ocs(8)

Steven Shiau <steven _at_ clonezilla org>

2026-05-03 Clonezilla