Protecting data during different connectivity states

Aspects of the subject matter described herein relate to data protection. In aspects, during a backup cycle, backup copies may be created for files that are new or that have changed since the last backup. If external backup storage is not available, the backup copies may be stored in a cache located on the primary storage. If backup storage is available, the backup copies may be stored in the backup storage device and backup copies that were previously stored in the primary storage may be copied to the backup storage. The availability of the backup storage may be detected and used to seamlessly switch between backing up files locally and remotely as availability of the backup storage changes.

BACKGROUND

Many people who use computers recognize the need to create backup copies of the data that is stored on the computers. Not only does computer hardware sometime fail, but sometimes files are overwritten or deleted on accident. Unfortunately, for various reasons, many of the people who recognize the need to create backup copies of their data do not actually protect their data through regular or even non-regular backups.

SUMMARY

Briefly, aspects of the subject matter described herein relate to data protection. In aspects, during a backup cycle, backup copies may be created for files that are new or that have changed since the last backup. If external backup storage is not available, the backup copies may be stored in a cache located on the primary storage. If backup storage is available, the backup copies may be stored in the backup storage device and backup copies that were previously stored in the primary storage may be copied to the backup storage. The availability of the backup storage may be detected and used to seamlessly switch between backing up files locally and remotely as availability of the backup storage changes.

This Summary is provided to briefly identify some aspects of the subject matter that is further described below in the Detailed Description. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

The phrase “subject matter described herein” refers to subject matter described in the Detailed Description unless the context clearly indicates otherwise. The term “aspects” is to be read as “at least one aspect.” Identifying aspects of the subject matter described in the Detailed Description is not intended to identify key or essential features of the claimed subject matter.

The aspects described above and other aspects of the subject matter described herein are illustrated by way of example and not limited in the accompanying figures in which like reference numerals indicate similar elements and in which:

DETAILED DESCRIPTION

Definitions

As used herein, the term “includes” and its variants are to be read as open-ended terms that mean “includes, but is not limited to.” The term “or” is to be read as “and/or” unless the context clearly dictates otherwise. The term “based on” is to be read as “based at least in part on.” The terms “one embodiment” and “an embodiment” are to be read as “at least one embodiment.” The term “another embodiment” is to be read as “at least one other embodiment.”

As used herein, terms such as “a,” “an,” and “the” are inclusive of one or more of the indicated item or action. In particular, in the claims a reference to an item generally means at least one such item is present and a reference to an action means at least one instance of the action is performed.

Sometimes herein the terms “first,” “second,” “third,” and so forth are used. The use of these terms, particularly in the claims, is not intended to imply an ordering but is rather used for identification purposes. For example, the phrase “first version” and “second version” does not necessarily mean that the first version is the very first version or was created before the second version or even that the first version is requested or operated on before the second versions. Rather, these phrases are used to identify different versions.

Other definitions, explicit and implicit, may be included below.

Exemplary Operating Environment

Aspects of the subject matter described herein are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, or configurations that may be suitable for use with aspects of the subject matter described herein comprise personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microcontroller-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, personal digital assistants (PDAs), gaming devices, printers, appliances including set-top, media center, or other appliances, automobile-embedded or attached computing devices, other mobile devices, distributed computing environments that include any of the above systems or devices, and the like.

With reference toFIG. 1, an exemplary system for implementing aspects of the subject matter described herein includes a general-purpose computing device in the form of a computer110. A computer may include any electronic device that is capable of executing an instruction. Components of the computer110may include a processing unit120, a system memory130, and a system bus121that couples various system components including the system memory to the processing unit120. The system bus121may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, Peripheral Component Interconnect (PCI) bus also known as Mezzanine bus, Peripheral Component Interconnect Extended (PCI-X) bus, Advanced Graphics Port (AGP), and PCI express (PCIe).

The computer110typically includes a variety of computer-readable media. Computer-readable media can be any available media that can be accessed by the computer110and includes both volatile and nonvolatile media, and removable and non-removable media. By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media.

The computer110may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,FIG. 1illustrates a hard disk drive141that reads from or writes to non-removable, nonvolatile magnetic media, a magnetic disk drive151that reads from or writes to a removable, nonvolatile magnetic disk152, and an optical disc drive155that reads from or writes to a removable, nonvolatile optical disc156such as a CD ROM or other optical media. Other removable/non-removable, volatile/nonvolatile computer storage media that can be used in the exemplary operating environment include magnetic tape cassettes, flash memory cards, digital versatile discs, other optical discs, digital video tape, solid state RAM, solid state ROM, and the like. The hard disk drive141may be connected to the system bus121through the interface140, and magnetic disk drive151and optical disc drive155may be connected to the system bus121by an interface for removable non-volatile memory such as the interface150.

The drives and their associated computer storage media, discussed above and illustrated inFIG. 1, provide storage of computer-readable instructions, data structures, program modules, and other data for the computer110. InFIG. 1, for example, hard disk drive141is illustrated as storing operating system144, application programs145, other program modules146, and program data147. Note that these components can either be the same as or different from operating system134, application programs135, other program modules136, and program data137. Operating system144, application programs145, other program modules146, and program data147are given different numbers herein to illustrate that, at a minimum, they are different copies.

A user may enter commands and information into the computer110through input devices such as a keyboard162and pointing device161, commonly referred to as a mouse, trackball, or touch pad. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, a touch-sensitive screen, a writing tablet, or the like. These and other input devices are often connected to the processing unit120through a user input interface160that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB).

A monitor191or other type of display device is also connected to the system bus121via an interface, such as a video interface190. In addition to the monitor, computers may also include other peripheral output devices such as speakers197and printer196, which may be connected through an output peripheral interface195.

Protecting Data

As mentioned previously, people often neglect to create backup copies of their data.FIG. 2is a block diagram that generally represents an exemplary environment in which aspects of the subject matter described herein may be implemented. As illustrated, the environment includes an apparatus205that includes primary storage210. The apparatus205is also connected to a backup storage215.

The apparatus205may be implemented using one or more computing devices. Such devices may include, for example, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microcontroller-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, cell phones, personal digital assistants (PDAs), gaming devices, printers, appliances including set-top, media center, or other appliances, automobile-embedded or attached computing devices, other mobile devices, distributed computing environments that include any of the above systems or devices, and the like. An exemplary device that may be configured to act as the apparatus205comprises the computer110ofFIG. 1.

The primary storage210may include any storage media capable of storing data. The term data is to be read broadly to include anything that may be represented by one or more computer storage elements. Logically, data may be represented as a series of 1's and 0's in volatile or non-volatile memory. In computers that have a non-binary storage medium, data may be represented according to the capabilities of the storage medium. Data may be organized into different types of data structures including simple data types such as numbers, letters, and the like, hierarchical, linked, or other related data types, data structures that include multiple other data structures or simple data types, and the like. Some examples of data include information, program code, program state, program data, other data, and the like. The primary storage210may be implemented using the computer storage media described in conjunction withFIG. 1.

In one embodiment, the primary storage210may be internal to the apparatus205. In this embodiment, the primary storage210may be attached to the apparatus205in various ways as will be appreciated by those skilled in the art. As one example, the primary storage210may comprise a hard disk that is attached to an internal structure of the apparatus205.

In another embodiment, the primary storage210may be external, or include components that are both internal and external to the apparatus205. For example, the primary storage may include a USB storage device, an iSCSI connected storage device, and the like.

The primary storage210may include one or more physical devices that are of the same or different types. The one or more physical devices may be formatted with a file system. The apparatus205may rely on the primary storage210as the default storage to store file system objects (hereinafter sometimes referred to as files).

The line220represents a connection from the apparatus205to the backup storage215. The computer may be connected to the backup storage215in a variety of ways. For example, the computer may be connected to the backup storage215via direct wired media such as a USB cable, IEEE 1394 cable, fiber-optic cable, or other physical media, wireless media such as RF, infrared, and other wireless media, and the like. The line220may represent a network that includes servers, routers, switches, and other networking devices, and the like that logically connects the apparatus205to the backup storage215.

The backup storage215may become available and unavailable to the apparatus205and may be susceptible to being connected and disconnected frequently from the apparatus205. Furthermore, the backup storage215may change states between available and unavailable at predictable or unpredictable times—at least from the perspective of the apparatus205.

When the apparatus205detects that the backup storage215is available (e.g., the backup storage215has been connected to the computer, turned on, or otherwise made available), the apparatus205may seek to backup files that are stored on the primary storage210to the backup storage215.

Because the backup storage215may be disconnected or otherwise made unavailable to the apparatus205at any time, the apparatus205may include logic and maintain data to track progress of creating backup copies of files of the primary storage210to the backup storage215.

In addition, the apparatus205may also maintain a backup copy of files, including those that have been added or changed since last backup, on the primary storage210itself. Added may include added to a protected namespace (e.g., adding a file to a directory that is configured for backup), added by changing the protected namespace to include the file (e.g., changing the directories to be backed up), and the like. As used herein, the term changed is meant to include files that have been added or files that have been changed. For example, while the backup storage215is unavailable, a data protection engine executing on the apparatus205may periodically create copies of files that have changed on the primary storage210and store these copies in a designated location on the primary storage210. This designated location is sometimes referred to as a cache. Later, when the backup storage215becomes available, the data protection engine may copy the backup copies from the primary storage210to the backup storage215.

If the backup storage215becomes unavailable while the computer is copying a file to the backup storage215, the apparatus205may maintain data that indicates that the file was not successfully copied, data that indicates how much of the file was copied to the backup storage, or other data indicative of the status of copying the file to the backup storage215.

In particular, for each file that needs to be backed up the backup storage215, backup data may be maintained that indicates one of three states: not started, in progress (i.e., copied to cache), and processed (e.g., copied to backup storage). Not started indicates that the file has been marked as needing to be backed up, but that creating a backup copy of the file has not completed and perhaps not even started to either the cache of the primary storage210or the backup storage215. Sometimes as used herein not started is referred to as not completely copied. In progress means that a copy of the file has been created and stored on the cache of the primary storage210, but that the file has not been completely copied to the backup storage215. Processed means that a backup copy of the file has been stored on the backup storage215.

A file may go from the not started state to the in progress state or the processed state, depending on whether the backup storage215is available or unavailable. In one embodiment, if the backup storage215is available, a copy of the file may stored on the backup storage215without creating a copy of the file for storage on the cache of the primary storage210. In another embodiment, a copy of the file may be stored both on the backup storage215and in the cache even if the backup storage215is available at the time the copy is made.

After a file goes to the in progress state, the file may go to the processed state after the backup storage215becomes available and the file is copied from the cache to the backup storage215.

FIG. 3is a block diagram that illustrates versions of and other data related to two exemplary files that may be backed up in accordance with aspects of the subject matter described herein. As illustrated, there are files301and302. File301has versions305-308while file302has version310-315. The versions305-308and310-315represent different versions of the files301-302, respectively, as the versions existed at certain times. The data321and322represents backup state that may be stored regarding the files301and302, respectively.

In operation, only the last version of a file may be in the not started state. For example, the last version308of the file301may be in the not started state while the last version315of the file302may be in the not started state. The last version of a file is not required to be in the not started state and may be in the in progress state or the processed state.

Various updates may occur to the data321and322depending on what happens while attempting to backup versions of files. For example, if a file is in the not started state and a data protection engine attempts to back up the file and the file changes during the backup attempt, the version may be remarked as not started. In addition, updates to namespace records may occur as will be explained in more detail below.

In backup data for a file, there may be one or more versions that are marked as processed as well as one or more versions that are marked as in process. An exemplary representation of this data is illustrated by data321and322, where P stands for processed, IP stands for in progress, and NS stands for not started.

Returning toFIG. 2, the apparatus205may include hardware and/or software that detects when the state of availability changes for the backup storage215. When the state changes, the data protection engine may be informed or otherwise become aware of the state change and may take actions to seamlessly continue protecting changed files by copying the files to a designated portion of the primary storage210or the backup storage215. For example, if the backup storage215becomes unavailable while the data protection engine is copying a file from the primary storage210to the backup storage215, the data protection engine may copy the file to a cache on the primary storage210and may subsequently copy other files that change to the cache on the primary storage210until the backup storage215again becomes available.

Likewise, if the backup storage215becomes available while the data protection engine is copying files from the primary storage210to a cache in the primary storage210, the data protection engine may start copying changed files from the primary storage210to the backup storage215and may also copy files from the cache in the primary storage210to the backup storage215.

The term cache as used herein means a portion of the primary storage210that is reserved or used to store backup copies of files. The cache may be located in a directory or may be spread throughout the file system of the primary storage210. The cache may be expandable, shrinkable, or fixed in size and may be dependent on a total size of the primary storage210.

When the backup storage215is not available, backup copies of files may be copied to a cache in the primary storage210. Once a version of a file is successfully copied to the cache, the state of the version may be marked as in progress.

That backup storage215may be treated as unavailable for a given file if it does not include enough free space to store a backup copy of a file that needs to be backed up. In that case, the file may be copied to the cache in the primary storage210. Once space becomes available on the backup storage215or a different backup storage device is connected, the file may then be copied to the backup storage. When it is connected to the apparatus205, the backup storage215may treated as available for files that are small enough to fit in the free space of the backup storage215while at the same time being treated as unavailable for files that are not small enough to fit in the free space.

If the cache gets full, various actions may be taken to protect files that have changed on the primary storage210. In one embodiment, a configurable number of the most recent files are protected. For example, referring toFIG. 3, if there is not enough space on the cache for version associated with record330of the file302, the backup copy for the in progress copy of the file associated with the record325may be deleted from the cache to make room for another copy of the file302to be stored on the cache.

In some cases when seeking to free space in the cache, an old version may be selected from a different file than the one for which a backup copy is needed. For example, referring toFIG. 3, if space is needed in the cache to back up a version of the file301, the space freed from the cache may come from deleting one or more versions associated with the file302or other files. In one embodiment, the one or more versions may be selected based on age because they are the oldest versions stored in the cache.

In addition to deleting a version of a file from the cache, a namespace record may be modified to accommodate the deletion of this version from the cache. To track a namespace for versions of files over time, a catalog may be maintained as disclosed in a United States patent application entitled “FILE SYSTEM BACKUP USING CHANGE JOURNAL,” filed Dec. 3, 2010, having Ser. No. 12/959,401, which application is assigned to the assignee of this patent application and hereby incorporated by reference. This catalog may be updated by 1) removing a namespace record for each version that is deleted from the cache and 2) potentially updating a remaining namespace record to account for the change in time covered by a version associated with the namespace record.

FIG. 4is a block diagram that generally represents actions that may occur in freeing space in a cache in accordance with aspects of the subject matter described herein. The data410includes backup data for versions of a file. The data405includes namespace data associated with the records of the data410. In particular, the namespace records415-420are associated with the versions425-430of the file410and indicate that the version425existed from time1-3, the version426existed from time4-9, the version427existed from time10-15, the version428existed from time16-18, and version429existed from time19-21, and the version420existed from time22onward.

After deleting the version427and its associated namespace record417, the namespace record416may be changed to indicate an end time of the version427as illustrated by the data412. If the namespace record associated with the record324is the last in the lineage for a file (e.g., the file was deleted and a new file having the same name was created), the namespace record for the previous version may not be changed to have an end time of the deleted namespace record.

If a version is deleted from the cache for an in progress record that is the last record for the file, the state of the backup for the last record may be changed from in progress to not started. The last record may also be flagged to indicate that the file is not to be backed up into the cache unless the file changes again.

It is possible that an in progress record that is about to be deleted is associated with a file that has partially been copied to the backup storage215already. If the backup storage215is not available at the time of deletion, the file record may not be deleted completely. Instead, the file record may be marked with a “to be deleted” flag. Once the backup storage215becomes available again and the data protection engine is able to delete the partial copy of the file, the file record may then be deleted completely. In one implementation, the data protection engine may process files marked with the “to be deleted” flag before backing up files to the backup storage215. Namespace changes described previously may be performed immediately, even if the backup storage215is not available at the moment.

FIG. 5is a block diagram that represents a system configured in accordance with aspects of the subject matter described herein. The components illustrated inFIG. 5are exemplary and are not meant to be all-inclusive of components that may be needed or included. In other embodiments, the components described in conjunction withFIG. 5may be included in other components (shown or not shown) or placed in subcomponents without departing from the spirit or scope of aspects of the subject matter described herein. In some embodiments, the components and/or functions described in conjunction withFIG. 5may be distributed across multiple devices.

Turning toFIG. 5, the apparatus500may include data protection components510, a store535, a communications mechanism530, and other components (not shown). The apparatus500corresponds to the apparatus205and may be implemented as the apparatus205may be implemented.

The communications mechanism530allows the apparatus500to communicate with other entities. For example, the communications mechanism530may allow the apparatus to communicate with one or more devices (e.g., network attached storage, a storage area network device, a file server, or the like) that store backup copies of files included on the primary storage535. The communications mechanism530may be a network interface or adapter170, modem172, USB or other port, or any other mechanism for establishing communications as described in conjunction withFIG. 1.

The primary storage535is any storage media capable of storing data including files of the apparatus500. The primary storage535may be implemented with a file system, database, volatile memory such as RAM, other storage, some combination of the above, and the like and may be distributed across multiple devices. The primary storage535may be external, internal, or include components that are both internal and external to the apparatus500. The primary storage535may operate similar to the primary storage210ofFIG. 2.

The backup storage540also includes any storage media capable of storing data. The backup storage540is external to the apparatus500and may be stand alone or implemented on a server. The backup storage540may be implemented using a file system, database, nonvolatile memory, volatile memory such as RAM, other storage, some combination of the above, and the like and may be distributed across multiple devices. The backup storage540may operate similar to the backup storage210ofFIG. 2.

The data protection components510may include a change detector515, a cache manager520, a data protection engine517, a connectivity detector525, and other components (not shown). As used herein, the term component is to be read to include hardware such as all or a portion of a device, a collection of one or more software modules or portions thereof, some combination of one or more software modules or portions thereof and one or more devices or portions thereof, and the like.

The connectivity detector525may be operable to determine the availability of the backup storage540as availability has been described in conjunction withFIG. 2.

The change detector515is a component that detects whether changes have occurred to files of a protected namespace. For example, the change detector515may use timestamps, may monitor changes made to the file system, or may use other mechanisms to determine whether changes have occurred. Based on the teachings herein, those skilled in the art may recognize other ways for detecting whether changes have occurred to files that may be used without departing from the spirit or scope of aspects of the subject matter described herein.

When the change detector515determines that a file has changed, the change detector515may communicate with the data protection engine517to indicate the file has changed. In response, the data protection engine517may undertake actions to back up the file (and other files that have changed) to the primary storage535or the backup storage540. For example, the data protection engine may perform actions including:

1. If the backup storage540is available, copying a file to the backup storage540; and

2. If the backup storage540is not available, copying the file to the cache via the cache manager520.

Under the direction of the data protection engine517, the cache manager520may operate to store, in a cache, backup copies of versions of the files located on the primary storage535. The cache manager520may be further operable to delete versions of files in the cache to make additional free space available in the cache for storing recent versions of files.

In conjunction with deleting files in the cache via the cache manager520, the data protection engine517may be further operable to update a data structure (e.g., such as a catalog) to delete records (e.g., a namespace record and a file record) associated with a deleted version of a file. The data protection engine517may also update another record (e.g., a previous namespace record) associated with a second version of the file to indicate that the second version has an ending time of the deleted version as mentioned previously in conjunction withFIGS. 2-4.

The data protection engine517may also maintain state of copying the files to storage as mentioned previously where the state includes: not started, copied to cache, and copied to second storage.

FIGS. 6-7are flow diagrams that generally represent exemplary actions that may occur in accordance with aspects of the subject matter described herein. For simplicity of explanation, the methodology described in conjunction withFIGS. 6-7is depicted and described as a series of acts. It is to be understood and appreciated that aspects of the subject matter described herein are not limited by the acts illustrated and/or by the order of acts. In one embodiment, the acts occur in an order as described below. In other embodiments, however, the acts may occur in parallel, in another order, and/or with other acts not presented and described herein. Furthermore, not all illustrated acts may be required to implement the methodology in accordance with aspects of the subject matter described herein. In addition, those skilled in the art will understand and appreciate that the methodology could alternatively be represented as a series of interrelated states via a state diagram or as events.

Turning toFIG. 6, at block605, the actions begin. At block610, a determination is made that a file has changed and needs to be backed up. For example, referring toFIG. 5, the change detector515may detect that a change has occurred to a file on the primary storage535.

At block615, backup storage availability may be detected. For example, referring toFIG. 5, the connectivity detector525may receive notification from an operating system (OS) component, may poll an OS or other component, may inspect data structures that indicate connectivity, may attempt to communicate with the backup storage, or may take other actions or the like to detect whether the backup storage540is available to the apparatus500. Detecting that the backup storage540is available may include determining that the backup storage540has been directly connected via a wired or wireless media or detecting that backup storage540is reachable via a network connected to the apparatus500. Detecting whether the backup storage540is available may also involve checking free space on the backup storage540as described previously. If the free space is less than the size of the file, it may be determined that the backup storage540is not available.

At block620, if the backup storage is available, the actions continue at block625; otherwise, the actions continue at block630.

At block625, the file is copied to the backup storage. For example, referring toFIG. 5, the data protection engine517may attempt to copy a file from the primary storage535to the backup storage540. If the attempt is successful, the actions continue at block635; otherwise, the actions may continue at block640.

At block630, the file is copied to the cache of the primary storage. For example, referring toFIG. 5, the data protection engine517may attempt to copy a file from the primary storage535to cache on the primary storage535.

Before copying the file to the cache, a check may be performed to determine if the cache has enough free space in which to copy the file. If not, space may be freed in the cache previously prior to copying the file to the cache. This may involve deleting a first namespace record and a file record associated with a version that is being deleted and updating a second namespace record to have an ending time of the first namespace record as mentioned previously.

If the attempt to copy the file to the cache successful, the actions continue at block635; otherwise, the actions may continue at block640.

At block635, state and other information (e.g., a catalog that includes a namespace) of the backup operation may be updated. For example, referring toFIG. 5, the data protection engine517may update the state of the backup from not started to in progress if the file was copied to the cache or to processed if the file was copied to the backup storage540. Updating the other information may include updating a data structure to indicate whether the file has been copied to the cache, the backup storage, or both the cache and the backup storage.

If at any time the availability of the backup storage changes state, subsequent backup operations may proceed accordingly. For example, if the backup storage state changes from being available to no longer available, this may be detected (e.g., through a failure of a file operation, through notification of state change, or the like), and the file may then be copied to the cache. Likewise, if the backup storage state changes from unavailable to available, files may begin being copied from the primary storage535to the backup storage540.

In some implementations, a data protection engine may have time constraints for copying files to the backup storage. For example, the data protection engine may be given a certain amount of time to backup changed files to the backup storage. As another example, a computer hosting the data protection engine may notify the data protection engine of a pending shutdown (e.g., a user may shut a laptop lid). Based on these time constraints, the data protection engine may stop the copying operation of a file while maintaining an indication that the file still needs to be copied. Maintaining an indication may include leaving the state of the file (e.g., not started or in progress) unchanged. When another backup cycle is started, the data protection engine may resume copying one or more portions of the file that were not copied in the previous backup cycle to the cache or second storage.

At block640, other actions, if any, may be performed.

Turning toFIG. 7at block705, the actions begin. At block710, a file change is detected. For example, referring toFIG. 5, the change detector515may detect that a change has occurred to a file on the primary storage535.

At block715, the second storage may be detected at not available. For example, referring toFIG. 5, the connectivity detector525may detect that the backup storage is not connected to the apparatus500.

At block720, the cache is checked to determine whether the cache has sufficient free space to store a copy of the file. For example, the data protection engine517may employ the cache manager520to check the free space of the cache stored on the primary storage535. For example, the cache may not have sufficient free space to store a copy of the file.

At block725, space in the cache is freed to make room for copying the file. For example, employing the cache manager520, the data protection engine517may delete previous versions of files and update data structures as previously indicated.

At block730, the file may be copied to the cache. For example, referring toFIG. 5, the data protection engine517may employ the cache manager520to copy a file from the primary storage535to the cache.

If during a backup cycle, the backup storage is detected as available, files from the cache may be copied from the cache to the backup storage as indicated in block740. For example, referring toFIG. 5, the data protection engine517may receive notification from the connectivity detector525that the backup storage540is available.

At block745, in response to the indication of availability above, files may be copied from the cache to the backup storage. For example, referring toFIG. 5, after receiving an indication that the backup storage540is available, the data protection engine517may start copying files from the cache to the backup storage540.

In addition if a time constraint dictates that the backup cycle end, the data protection engine may stop the copying of files and may maintain data structures that indicate the files that still need to be backed up as well as the portions of the files that need to be backed up for files that were only partially copied.

At block730, other actions, if any, may be performed.

As can be seen from the foregoing detailed description, aspects have been described related to data protection. While aspects of the subject matter described herein are susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described above in detail. It should be understood, however, that there is no intention to limit aspects of the claimed subject matter to the specific forms disclosed, but on the contrary, the intention is to cover all modifications, alternative constructions, and equivalents falling within the spirit and scope of various aspects of the subject matter described herein.