Patent attributes
The disclosed embodiments provide a system that uses overlay metadata in a cloud controller to generate incremental snapshots for a distributed filesystem. Two or more cloud controllers collectively manage distributed filesystem data that is stored in one or more cloud storage systems. More specifically, the cloud controllers cache and ensure data consistency for the data stored in the cloud storage systems, with each cloud controller maintaining a metadata hierarchy that reflects the current state of the distributed filesystem. During operation, a cloud controller receiving new data from a client: (1) stores the new data in the cloud controller; (2) creates a metadata entry for the new data in the locally maintained metadata hierarchy; (3) updates the overlay metadata to point to the metadata entry and the new data stored in the cloud controller; and (4) then uses the overlay metadata to generate an incremental snapshot for the new data.