Retrieving documents from a library using filter like
[SELECT Title FROM ContentVersion WHERE ContentDocument.ParentId = :workspaceId]
may be incorrect, if document is shared with several libraries, and workspaceId is not equal to the library it was initially uploaded to.
Example: Doc1 was uploaded in Library1, and then shared with Libary2. If you use Libary2.Id as workspaceId in the query above, it will return 0 results, because ContentDocument.ParentId will be equal to Library1.Id.
Document and Library sharing dependencies can be viewed in ContentWorkspaceDoc object. So I would try this query:
[SELECT Title
FROM ContentVersion
WHERE ContentDocumentId in (SELECT ContentDocumentId
FROM ContentWorkspaceDoc
WHERE ContentWorkspaceId = :workspaceId
)
]
If you need to export all document versions, you can look at this solution.