Abstract:
A storage gateway ( 2 ) includes: a media card reader ( 23 ) for reading data from an external media card ( 25 ); a storage device ( 20 ) for storing the data read from the media card; a data folder ( 200 ) for storing a plurality of subfolders ( 2000 ), the subfolders being for storing card IDs ( 250 ) of various media cards and the data of the media card; and at least two LEDs ( 22, 28 ) for denoting different states of the storage gateway. A related data backup method comprises: checking whether there is a card ID in the media card; checking whether there is a subfolder in a data folder if there is a card ID in the media card; determining whether the entire data of the media card are in the subfolder, if there is a subfolder in the data folder; copying the data; and examining whether the copying is completed.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to computer and communication network devices, and particularly to a storage gateway and a data backup method for the storage gateway.  
         [0003]     2. Prior Art  
         [0004]     With the ongoing development of the Internet, how to store data effectively and efficiently is becoming even more important than before. Different storage devices have individual hardware and software infrastructures for storing data. A gateway may have an internal storage device or an external storage device for storing data.  
         [0005]      FIG. 4  is a block diagram of a conventional storage gateway  10 . A media device  12  and an external storage device  13  are connected to the storage gateway  10  via USB interfaces  11 . A plurality of personal computers  15  is connected to the storage gateway  10  respectively via Local Area Network (LAN) interfaces  14  or fiber/wireless interfaces  16 . Users can transmit instructions to copy information through the personal computers  15 , when the media device  12  and the personal computers  15  are powered on. The storage gateway  10  duly backs up the data of the media device  12 , with the data being stored in an internal storage device  100  of the storage gateway  10  or in the external storage device  13 . After the data are backed up, the connection between the media device  12  and the storage gateway  10  is turned off. One shortcoming of the storage gateway  10  is that it is necessary to start up the personal computers  15  each time copying of the data from the media device  12 . This makes the procedure unduly complicated. For further reference, an example of a product using conventional storage technology is the USR8200 firewall/VPN produced by USRobotics®.  
       SUMMARY OF THE INVENTION  
       [0006]     A first objective of the present invention is to provide a storage gateway having an integrated media card reader for backing up data from an external media card to the storage gateway.  
         [0007]     A second objective of the present invention is to provide a data backup method which utilizes the above-described storage gateway.  
         [0008]     In order to accomplish the above-mentioned first objective, a preferred embodiment of a storage gateway comprises: a media card reader for reading data from an external media card; a storage device for storing the data read from the media card; a data folder for storing a plurality of subfolders, the subfolders being for storing card IDs of various media cards and the data of the media card; and at least two Light Emitting Diodes (LEDs) for denoting different states of the storage gateway.  
         [0009]     In order to accomplish the above-mentioned second objective, a data backup method of the present invention comprises the steps of: (i) setting the storage gateway as backup enabled; (ii) checking whether there is a card ID in the media card; (iii) checking whether there is a subfolder in a data folder of the storage gateway which corresponds to the media card, if there is a card ID in the media card; (iv) determining whether the entire data of the media card are in the subfolder, if there is a subfolder in a data folder of the storage gateway which corresponds to the media card; (v) copying the data of the media card to the subfolder, if the entire data of the media card are not in the subfolder; and (vi) determining whether the copying is completed.  
         [0010]     Other objects, advantages and novel features of the present invention will be drawn from the following detailed description with reference to the attached drawings, in which:  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0011]      FIG. 1  is a schematic diagram of an application environment of a storage gateway in accordance with the preferred embodiment of the present invention;  
         [0012]      FIG. 2  illustrate display states of LEDs of the storage gateway of  FIG. 1 ;  
         [0013]      FIG. 3  is a flow chart of a preferred data backup method in accordance the present invention; and  
         [0014]      FIG. 4  is a block diagram of an application environment of a conventional storage gateway. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0015]      FIG. 1  is a schematic diagram of an application environment of a storage gateway  2  in accordance with the preferred embodiment of the present invention. In the preferred embodiment, the storage gateway  2  comprises a storage device  20 , a card reader activity Light Emitting Diode (LED)  21 , a card reader backup LED  22 , a power LED  28  and a media data source like a media card reader  23 . The media card reader  23  is used for reading data stored in a media card  25 . The storage device  20  comprises a data folder  200 , which includes a plurality of subfolders  2000 . The subfolders  2000  are provided for storing the data read by the media card reader  23 . A plurality of personal computers  26  is connected to the storage gateway  2  respectively via LAN interfaces  24  or fiber/wireless interfaces  27 . The personal computers  26  are used for setting parameters related to backup states of the storage gateway  2 .  
         [0016]     In the preferred embodiment, the media card  25  is directly inserted into the media card reader  23  in the storage gateway  2 . The media card reader  23  is used for reading data stored in the media card  25 , and for storing the data in the storage device  20 . A card ID  250  is solely assigned to the media card  25  for identification. The power LED  28  indicates whether the storage gateway  2  is working. The card reader activity LED  21  indicates whether the media card  25  is inserted into the media card reader  23 , and the card reader backup LED  22  indicates whether the storage gateway  2  backs up the data stored in the media card  25 . The card reader activity LED  21  and the card reader backup LED  22  are provided together for indicating different working states of the media card reader  23  and the storage gateway  2 .  
         [0017]     Referring to  FIG. 2 , three LEDs of the storage gateway  2  are the card reader activity LED  21 , the card reader backup LED  22 , and the power LED  28 . The LEDs  21 ,  22 ,  28  collectively presents any of the following seven states in which the storage gateway  2  is: a. the card reader activity LED  21 , the card reader backup LED  22  and the power LED  28  are off, when the storage gateway  2  is powered off; b. the power LED  28  lights up, and the card reader activity LED  21  and the card reader backup LED  22  are off, when the storage gateway  2  is set as backup disabled by users through one of the personal computers  26 , and the media card  25  is not inserted into the media card reader  23 ; c. the card reader activity LED  21  is off, and the power LED  28  and the card reader backup LED  22  light up, when the storage gateway  2  is set as backup enabled by users through one of the personal computers  26 , and the media card  25  is not inserted into the media card reader  23 ; d. in the backup disabled state of the storage gateway  2 , the card reader backup LED  22  is off, and the power LED  28  and the card reader activity LED  21  light up, when the media card  25  is inserted into the media card reader  23 . At the time, the data stored in the media card  25  is not backed up to the storage gateway  2 ; e. in the backup enabled state of the storage gateway  2 , the power LED  28 , the card reader activity LED  21  and card reader backup LED  22  light up, when the media card  25  is inserted into the media card reader  23 . At the time, the data stored in the media card  25  is automatically backed up to the storage gateway  2 ; f. the power LED  28  and the card reader activity LED  21  light up, and the card reader backup LED  22  blinks fast, while the storage gateway  2  is copying the data of the media card  25 ; and g. the power LED  28  and the card reader activity LED  21  light up, and the card reader backup LED  22  blinks slowly, if an error has occurred during the copying process.  
         [0018]     As seen, in the preferred embodiment, the card reader backup LED  22  indicates two backup states of the storage gateway  2 : backup enabled and backup disabled. Parameters related to the two backup states are set by users through one of the personal computers  26 . For example, “1” can indicate backup enabled, and “0” can indicate backup disabled.  
         [0019]     Once one parameter related to the backup states of the storage gateway  2 , such as an backup enabled parameter, has been set, it is not necessary to modify the backup enabled parameter if a subsequent operation is also backing up the data from the media card  25  to the storage gateway  2 . That is, the parameters related to the backup states for the storage gateway  2  are inheritable for subsequent operations. If the subsequent operation is only reviewing the data stored in the media card  25  and not backing up it, only then is it necessary to modify the backup enabled parameter to a backup disabled parameter via the personal computers  26 .  
         [0020]     When the storage gateway  2  is set as backup disabled, the card reader backup LED  22  is off. At the time, users may review the data of the media card  25  via the personal computers  26  when the media card  25  is inserted into the media card reader  23 . When the storage gateway  2  is set as backup enabled, the card reader backup LED  22  lights up. At the time, the media card reader  23  is reading data stored in the media card  25 , and storing the data in the storage device  20  when the media card  25  is inserted into the media card reader  23 .  
         [0021]     The media card  25  comprises a card ID  250  that is solely assigned by a file system in the storage gateway  2 . When the media card  25  is substantially inserted into the media card reader  23 , the file system in the storage gateway  2  automatically determines whether the media card  25  has a unique card ID  250 . If not, the storage gateway  2  generates and assigns a new, unique card ID  250  to the media card  25 .  
         [0022]     If and when the media card  25  has the unique card ID  250 , the file system checks whether there is a subfolder  2000  in the data folder  200  corresponding to the card ID  250 . If not, the storage gateway  2  generates a new subfolder  2000  in the data folder  200  corresponding to the card ID  250 , and backs up the data of the media card  25  in the newly generated subfolder  2000 .  
         [0023]     If the subfolder  2000  corresponding to the card ID  250  is in the data folder  200 , the file system compares the data of the subfolder  2000  with that of the media card  25 . If the data are entirely the same, the file system does not back up the data of the media card  25 . Otherwise, the file system backs up the data of the media card  25  to the subfolder  2000 .  
         [0024]      FIG. 3  is a flow chart of the preferred data backup method of the present invention. First of all, the storage gateway  2  is powered on. At step S 301 , the storage gateway  2  is set as backup enabled.  
         [0025]     At step S 303 , the file system of the storage gateway  2  checks whether there is a card ID  250  in the media card  25 . That is, the file system checks whether the media card  25  has been read by the storage gateway  2 . If there is no card ID  250  in the media card  25 , at step S 304 , the storage gateway  2  generates a new card ID  250 , and assigns it to the media card  25 .  
         [0026]     If and when the card ID  250  is in the media card  25 , at step S 305 , the file system checks whether there is a subfolder  2000  corresponding to the card ID  250  in the data folder  200  of the storage gateway  2 . If there is no corresponding subfolder  2000  in the data folder  200 , at step S 306 , the storage gateway  2  generates a new subfolder  2000  corresponding to the card ID  250  of the storage gateway  2 .  
         [0027]     If and when the corresponding subfolder  2000  is in the data folder  200 , at step S 307 , the file system determines whether the entire data of the media card  25  are in the subfolder  2000 . If the entire data are in the subfolder  2000 , the whole backup process is finished. If the entire data are not in the subfolder  2000 , at step S 308 , the storage gateway  2  backs up the data of the media card  25  to the subfolder  2000 .  
         [0028]     At step S 309 , the file system determines whether the copying procedure is completed; that is, whether the data of the media card  25  are the same as those of the subfolder  2000 . If the data of the media card  25  and those of the subfolder  2000  are different, the procedure returns to step S 308 , and the ongoing backup process is continued. If and when the data of the media card  25  are the same as those of the subfolder  2000 , the whole backup process is finished.  
         [0029]     Although only a preferred embodiment and method of the present invention have been described in detail above, those skilled in the art will readily appreciate that many modifications to the preferred embodiment and method are possible without materially departing from the novel teachings and advantages of the present invention. Accordingly, all such modifications are deemed to be covered by the following claims and allowable equivalents of the claims.