METHOD FOR TRANSFERRING DATA BETWEEN
This is a continuation of Ser. No. 238,641, filed on 5 Aug. 30, 1988, now abandoned.
BACKGROUND OF THE INVENTION
The present invention is directed to data base systems and more particularly to a method of performing a backup dump of the contents of a data base system.
In modern day retail merchandising systems, which consist of a primary data terminal device and a plurality of remote secondary terminal devices, data generated by the secondary terminal devices during a merchandising operation is normally transmitted and stored in a disk file located in the primary terminal device. A backup system has been utilized to ensure that no data is lost when the primary terminal device becomes dis- 2Q abled. The backup system includes a second primary terminal device which receives the same data as the first primary terminal device during a merchandising operation. When the second primary terminal device becomes disabled or is withdrawn from operation, the 25 data stored in the first primary terminal device is required to be downloaded to the second primary terminal device at the conclusion of a day's operation so as to update the data in the second primary terminal device. In downloading the data base, all the data space in the 30 disk file is transferred regardless of whether the file contains stored data, hereinafter referred to as valid data, or empty space which contains no data, hereinafter referred to as invalid data. As the memory capacity of the present day terminal devices increases, the time 35 required for downloading the data base of the first primary terminal device has increased to the point that the operation cannot be completed before the start of the next day's activities.
It is therefore a principal object of this invention to *® provide a method for downloading a disk file which transfers only the valid data stored in the disk file.
SUMMARY OF THE INVENTION
This and other objects of the invention are fulfilled by 45 dividing the disk file of the primary terminal into a plurality of defined memory areas, storing in a portion of the disk file of the primary terminal device a directory listing the location of the disk space in each of the JQ defined memory areas in the disk file allocated for the storage of data, and storing a freespace map in each of the defined memory areas of the disk file indicating the location of valid data in that area. In downloading the valid data, the disk space containing only valid data is 55 read and the operating system of the primary terminal device transfers the valid data stored in this space to the second primary terminal device.
BRIEF DESCRIPTION OF THE DRAWINGS
Additional advantages and features of the present invention will become apparent and fully understood from a reading of the following description, taken in conjunction with the drawings, in which:
FIG. 1 is a schematic block diagram of the first and 65 second primary terminal devices showing the arrangement for the downloading of the data from the first terminal device to the second terminal device;
FIG. 2 is an illustration showing how a portion of the disk file is constructed and the number of bytes of data that can be stored at a specific location in the disk file;
FIG. 3 is a schematic block diagram of the disk file of FIG. 1 showing how the disk file is divided into partitions together with the location of the directory blocks of data of the disk file;
FIG. 4 is a diagrammatic representation of how each bit location in a byte of freespace map is coupled to a corresponding granule of disk space;
FIG. 5 is an illustration of a directory block of data of the disk file which contains data indicating the location of the begin block and the end block of allocated data space in a partition;
FIG. 6 is an illustration of the begin block of a partition;
FIG. 7 is a flow chart of the overall backup downloading program;
FIGS. 8A and 8B show a flow chart of a backup subroutine for detecting the location of the begin block and the end block of the data in each partition that is to be downloaded; and
FIG. 9 is a flow chart of a backup routine for downloading the valid data.
DESCRIPTION OF THE PREFERRED
Referring now to FIG. 1, there is shown a schematic block diagram of the first and second primary terminal devices indicated by numerals 20 and 22 arranged for a downloading operation. Each of the terminal devices 20, 22 includes an operating system 23, a processor 24, a disk file 26 and a plurality of disk drivers 28 for writing and reading data in the disk file and a communication controller 30 for controlling the transfer of data over a communication bus 32 coupled between the terminal devices 20 and 22.
Referring now to FIG. 2, there is illustrated a portion of the disk file showing how the disk file 26 is divided into specific storage areas. The basic storage area in the disk file is a block of data 34 which comprises a maximum of 256 bytes of data. Four blocks of data comprise one granule containing a maximum of 1024 bytes of data.
Referring now to FIG. 3, there is shown a schematic diagram of the disk file 26 (FIG. 1) in which the file of the present embodiment is divided into a number of partitions 40-1 to 40-N inclusive. The first row of data 38 of the disk file 26 contains thirty-three blocks of data comprising a directory in which the data represents the location of a first or begin block 42 and a last or end block 44, which blocks define the allocated disk space in each of the partitions 40-1 to 40-N in which data may be stored. The end block 44 in each of the partitions 40-1 to 40-N inclusive may be located at any position in the partition depending on the desired amount of data to be stored therein. In the present embodiment, the disk file 26 (FIG. 1) in each of the terminals may contain up to four partitions 40-1 to 40-N inclusive. As will be described more fully hereinafter, the begin block 42 for each partition contains data representing the number of freespace maps that are located in the begin block. A freespace map locates the number of granules of data in the partition which have valid data stored therein.
Referring now to FIG. 4, there is illustrated a diagrammatic representation of a eight bit portion 46 of a freespace map 62 (FIG. 6) located in the begin block 42 (FIG. 3) of each partition in which each bit in the map