Provided are a method, system, and program for replicating a file. A file
is copied to a target storage file system stored as a base file. A
reference file comprising the copied file is generated at a local
storage. An update is applied to the file at the local storage. A delta
file is generated indicating differences between the updated file at the
local storage and the reference file. A file system command is used to
transmit the delta file to the target storage file system store to store
in a directory of the target storage file system, wherein the file in the
local storage is replicated at the target storage by a combination of the
base file and the delta file.