I am trying to remember the name of a book (or maybe a short story, I can't think of enough to flesh it out to novel length.)
I don't recall when I read it but its probably at least 30+ years ago.
The story involves a man in Egypt. He has spent a couple of years(?) supervising people securely packing and storing manuscripts, tablets, maps, papyrus scrolls, and arranging remote hidden storage areas to store them. (Possibly caves or tombs, or maybe they were being stored in the cargo hold a ship during the story awaiting a full load for transport.)
When he first arrived in the area and arranged housing, while he was doing all this, he had acquired slaves to cook, clean, manage and maintain his house, and others to do the work of packing and transporting the material. Eventually, one of the house slaves catches his eye and they became romantically involved and he falls in love with her. (I don't know if he freed and married her, or if she just became his concubine.)
As he is nearing completion of packing all the material he is collecting, he discovers she is seriously sick and dying. She has been sick for weeks, but she and the other household slaves have been covering it up, so as not to disturb him as he's been so busy.
I think she dies just before or just as the city he is in starts burning and he is finishing up and moving the last loads of material to secure caves (or to the boats.)
He is cursing himself for not noticing she was sick, and the house slaves for not telling him she was sick.
As the city is burning, and he is leaving, we discover that the city is Alexandria. All things he had been collecting were from its library. It's revealed that he is a time traveler sent back in time to try to save the library. He is thinking if he had known she was sick he could have finished up a few weeks earlier and taken her with him when he returned to the future so she could be cured.