Links to files broken due to name shortening (due to migration to ecryptfs)

Hi,

I recently upgraded my ubuntu and I now have ecryptfs. In my case, the amount of files I have is quite big, so instead of syncing from the server I manually shortened all filenames that were longer than 143 chars (the maximum allowed in ecrypfs (see post-scriptum/PS)) and restored the storage directory and db manually in the new ubuntu installation.

The problem is that now many books and articles' link to its corresponding pdf/epub file are broken. Currently, an error pops up for each file, which requires that I search for the file, double click it, relink it, and then wait to load a new error, so this is extremely time consuming as a method to relink all broken links. The errors say: Error for operation 'open' for /home/blabla/Special files/Zotero/storage/U84XSHUA/old_long_filename.pdf.

I guess a solution could be to have a zotero folder similar to the "duplicated" or "unfiled" folders, but showing the items that have the link to its pdf/epub broken. Do you think that is feasible? Otherwise I am open to other approaches.

From what I understand, syncing from the server is not really an option since it will leave me with the same problem since all books with previously long names will be shortened and have the link to the pdf broken, right?

Thanks a lot!

Aleix
PS: I do not recommend ecryptfs, it slows down the system and restricts filenames up to 143 characters instead of 255. I think full disk encryption might be faster and does not have the caveat of restricting the filename length, which is a pain if you have long filenames stored in zotero.
  • From what I understand, syncing from the server is not really an option since it will leave me with the same problem since all books with previously long names will be shortened and have the link to the pdf broken, right?
    Zotero automatically shortens filenames if they're too long to save, so this may actually work for you. If you have all of your files on the server, you could try moving the contents of the local 'storage' directory out of the way, doing "Reset File Sync History" from the Sync -> Reset pane of the preferences, and syncing.

    Beyond that, I'm not totally clear what you're asking. You can sort by the attachment (blue dot) column to quickly see all the items with missing attached files.
  • (And yes, I'd use FDE over something like eCryptfs.)
  • Hi,

    Thanks for your answer.

    I was not aware of the feature of the attachment column. It is a full blue circle when it contains the attachment, it is an empty blue circle when the attachment is missing. Using this feature I could identify the entries whose link was broken (although I had to restart zotero some times because it just showed some empty circles at a time). This was enough for me, since I could identify the entries with broken links in a quick way.

    The only caveat of this method is that entries containing several files will show a full blue circle when one of its internal links is OK (while it contains some broken links to other files). Fortunately, I had only a few ones like this so this method was useful to me.

    Thank you again for your answer and maintaining Zotero so efficiently and in such a good shape! Congratulations!

    Aleix
Sign In or Register to comment.