diff --git a/worker/file_handler.go b/worker/file_handler.go index 26d8959eeae..c2e6e442fdc 100644 --- a/worker/file_handler.go +++ b/worker/file_handler.go @@ -139,6 +139,11 @@ func (h *fileHandler) GetManifests(uri *url.URL, backupId string) ([]*Manifest, return nil, err } + // Sort manifests in the ascending order of their BackupNum so that the first + // manifest corresponds to the first full backup and so on. + sort.Slice(manifests, func(i, j int) bool { + return manifests[i].BackupNum < manifests[j].BackupNum + }) return manifests, nil }