A method for managing storage devices (110, 125) in a system comprising a client, a local storage device (110; 300), a first cloud storage device (120; 320) and a second cloud storage device (130; 330), in which the local storage device receives files from the client and migrates data to the first cloud storage device, at least a portion of the data being replicated on the second cloud storage device wherein the local storage device does not participate in the replication of the at least a portion of the data, the method being performed by the local storage device and comprising: receiving a file (102 - 108) from the client; migrating data (306A, 306B) from the local storage device to the first cloud storage device, wherein the data comprises a metadata object (122; 132; 306A) and a data object (124; 134; 306B) associated with the file; in response to a first determination that the first cloud storage device is inaccessible to the local storage device, wherein the first determination comprises obtaining, from the second cloud storage device, a failure notification for the first cloud storage device, obtaining (Step 202) metadata objects from the second cloud storage device; identifying (Step 204), based on a sync time analysis, at least one metadata object of the metadata objects that is associated with a data object not present on the second cloud storage device, as a metadata object to be deleted, wherein identifying at least one metadata object as a metadata object to be deleted comprises: identifying (Step 220) a most recent sync time between the first cloud storage device and the second cloud storage device; identifying (Step 224) a timestamp of a selected metadata object of the metadata objects; determining (Step 226) whether the identified timestamp is after the most recent sync time; if the identified timestamp is after the most recent sync time, identifying (Step 228) data objects associated with the selected metadata object; determining (Step 230) whether all the identified data objects are present in the second cloud storage device; marking (Step 232) the selected metadata object for deletion if at least one of the identified data objects is not present; initiating the deletion (Step 206) of the at least one metadata object on the second cloud storage device, wherein the second cloud storage device is accessible to the local storage device; and updating (Step 208), after initiating the deletion of the at least one metadata object, a namespace (310, 340) on the local storage device, comprising deleting a file identifier associated with the at least one metadata object from the namespace, so as to maintain consistency of data between the second cloud storage device and the local storage device. receiving a file (102 - 108) from the client; migrating data (306A, 306B) from the local storage device to the first cloud storage device, wherein the data comprises a metadata object (122; 132; 306A) and a data object (124; 134; 306B) associated with the file; in response to a first determination that the first cloud storage device is inaccessible to the local storage device, wherein the first determination comprises obtaining, from the second cloud storage device, a failure notification for the first cloud storage device, obtaining (Step 202) metadata objects from the second cloud storage device; identifying (Step 204), based on a sync time analysis, at least one metadata object of the metadata objects that is associated with a data object not present on the second cloud storage device, as a metadata object to be deleted, wherein identifying at least one metadata object as a metadata object to be deleted comprises: identifying (Step 220) a most recent sync time between the first cloud storage device and the second cloud storage device; identifying (Step 224) a timestamp of a selected metadata object of the metadata objects; determining (Step 226) whether the identified timestamp is after the most recent sync time; if the identified timestamp is after the most recent sync time, identifying (Step 228) data objects associated with the selected metadata object; determining (Step 230) whether all the identified data objects are present in the second cloud storage device; marking (Step 232) the selected metadata object for deletion if at least one of the identified data objects is not present; identifying (Step 220) a most recent sync time between the first cloud storage device and the second cloud storage device; identifying (Step 224) a timestamp of a selected metadata object of the metadata objects; determining (Step 226) whether the identified timestamp is after the most recent sync time; if the identified timestamp is after the most recent sync time, identifying (Step 228) data objects associated with the selected metadata object; determining (Step 230) whether all the identified data objects are present in the second cloud storage device; marking (Step 232) the selected metadata object for deletion if at least one of the identified data objects is not present; initiating the deletion (Step 206) of the at least one metadata object on the second cloud storage device, wherein the second cloud storage device is accessible to the local storage device; and updating (Step 208), after initiating the deletion of the at least one metadata object, a namespace (310, 340) on the local storage device, comprising deleting a file identifier associated with the at least one metadata object from the namespace, so as to maintain consistency of data between the second cloud storage device and the local storage device.