Help with migrating attachments from one NAS device to another

edited 10 days ago
I've been so happy with Zotero that I'm in the process of using it to store my entire library in electronic form (as pdf files) on my NAS drive at home. I use Zotfile to manage attachments and store them on the NAS (call it "MyNAS") with a path beginning with: "MyShare/Zotero_Library." In Zotero_Library, Zotfile creates folders based on a document's creator-name and stashes the relevant pdf files within.

But because of my enthusiasm, I'm in the process of replacing the existing system having only 4 TB of storage by another one with 12 (and potentially 32) TB of storage. To be able to run the two systems side-by-side for now, I'm calling the new system "MyNAS2." In addition, based on experience with the old NAS, I'm getting rid of the "MyShare" part of the path. Instead, I'll be devoting an entire share to Zotero_Library. So new paths will begin with only: "Zotero_Libarary" -- the top-level folder on the share.

Other than these changes, once the new system is satisfactorily configured, I plan to use rsync to copy the library en masse from one device to another. So, for example, a pdf formerly located as "/MyNAS/MyShare/Zotero_Library/DoeJ/DoeJ 2008 - The Big Book of Conundrums.pdf" will now be at "/MyNAS2/Zotero_Library/DoeJ/DoeJ 2008 - The Big Book of Conundrums.pdf." (Here "MyNAS" and "MyNAS2" are actually the mount points.)

Then, when I'm happy everything is working perfectly, I will decommission MyNAS, reformat and move its existing drives into MyNAS2, and rename MyNAS2 to be MyNAS.

Meanwhile, the Zotero database will continue to reside on Zotero's server and sync among my various computers. But I'm realizing that if I'm not careful, all this movement and name-changing could break all the Zotero links to the documents currently stored on the old MyNAS.

So I'm writing to ask your advice: how should this be done to minimize any headaches with the attachments and their locations?

Ideally there'd be a Zotero command (with the goodness of regular expressions) like:

"change-attachment-path-part /MyNAS/MyShare /MyNAS2"

and then, when the old NAS retires,

"change-attachment-path-part /MyNas2 /MyNAS."

But it's not this simple, is it?
  • On your current set up, set up relative links with an attachment base directory
    /MyNAS/MyShare/Zotero_Library/

    Once you have everything transferred to the new disk change that to
    /MyNAS2/Zotero_Library/

    If anything goes wrong in that process (which I don't think it will) the Zutilo add-on has exactly the path-change function that you're looking for (but is a second-best to using relative paths).
Sign In or Register to comment.