A system for data backup includes a storage device, a backup storage device,
and
an intermediate storage device. Backup procedure is performed on-line and copies
data blocks from the storage device into the backup storage device. When a write
command is directed to a data storage block identified for backup that has not
yet been backed up, the identified data storage block is copied from the storage
device to the intermediate storage device, the write command is executed on the
identified data storage block from the storage device, and the data storage block
is copied from the intermediate storage device to the backup storage device. In
case of an error accessing a block on the storage device, the block is marked as
invalid. The intermediate storage device can be external to a file system of a
computer that includes the storage device, or can be located in the storage device,
or can be a separate partition of the storage device, or can be a file within a
file system. The system suspends a write command to the storage device during the
data backup process if the intermediate storage device has reached a selected data
capacity; and copies a selected amount of data from the intermediate storage device
to the backup storage device.