resume file transfer

Hi,
my script running on a red hat machine copies gigabyte-sized files from a windows-based lab device to a NetApp archive. Both source and destination are cifs-mounted. In the context of a recovery testing scenario the network cable will be unplugged. After plugging cable back the script should resume the copy process at the point before network failure, i.e. without copying from the beginning.

a) which script solution is appropriate?
b) rsync appropriate?

many thanks for your help

my script running on a red hat machine copies gigabyte-sized files from
a windows-based lab device to a NetApp archive. Both source and
destination are cifs-mounted. In the context of a recovery testing
scenario the network cable will be unplugged. After plugging cable back
the script should resume the copy process at the point before network
failure, i.e. without copying from the beginning.

a) which script solution is appropriate?

A script solution would need to understand that the target may be
incomplete. Resuming would involve opening the output file in “append
mode” and a seek on the input file to the matching position. You may or
may not core about the integrity of the already-copied data.

b) rsync appropriate?

“rsync --partial” is the usual option for this situation. Your situation
needs to understand that files may be incomplete (without --partial,
rsync tries to be all-or-nothing per file).

Cheers,
Cameron Simpson cs@cskk.id.au

many thanks Cameron for your help