A method and system for generating and restoring a backup image are
disclosed. According to one aspect of the invention, a server receives a
request to generate a backup image. The request includes a selection a
backup path. Based on the backup path, the server generates a list of
files and/or directories to backup. However, before writing the files to
the backup image, the server generates an offset map to indicate where in
the backup image each file will be located. The server then writes the
offset map to the backup image. During a restore operation, the server
receives a request to restore files, including a selection of files
and/or directories to restore. The server reads the offset map from the
beginning of the backup image to quickly determine the location in the
backup image of selected files.