Backup Data Directory on Google Drive

Hi,

I am using Zotero and would like to make sure that I keep a backup of everything in case my computer crashes. I have set up syncing for the citation data, but do not want to sync the attached files as well given the storage limitations. I have read elsewhere that it is dangerous to store your data directory on Google Drive. However, is it safe to store the data directory at its default location, and then sync the directory to Google Drive? With Google Drive for desktop it's possible to sync a local folder to Google Drive, but I am not sure if this is safe to do or not. I just want to make sure I do not lose the PDFs and their annotations if anything goes wrong.
  • don't point google drive at the data directory, not. You can pretty safely use it for the storage folder *within* the data directory, though, and that has all your attached files ("pretty safely" because you may still see the very occasional sync conflict, but that would only affect individual files, not corrupt your whole database)
  • Okay thank you.

    Is it possible to have the backup of the files include their annotations as well? It would be nice to be able to view the PDFs with their associated annotations on other devices too.
  • Annotations are stored in the database. You should obviously make sure you have a backup of the entire data directory, including the database. You just can't put the entire thing in a cloud storage folder.

    https://www.zotero.org/support/kb/annotations_in_database
    https://www.zotero.org/support/zotero_data#backing_up_your_zotero_data
  • But if the question is if you can have access to the annotations from outside Zotero on other devices the answer is no.
  • Piggy-backing on this question. Could someone point to which files store the annotations? Or a resource that lists them? I am wondering which files are constantly updated with changes to a reference (annotations, metadata, most recently updated etc), & which files aren't.

    I made the sin of storing directory in google drive & am now afraid of moving them again, so just decided to consolidate there & back up often.

    As I have a small thumb drive I am wondering if it would be sufficient to backup the .bib file & storage only.

    currently installed extensions I have are:
    - Better BibTex for Zotero
    - DOI Manager
    - scite Plugin for Zotero
    - Zotero Citation Counts Manager
    - ZoteroPreview
    - ZotFile
    - Zutilo Utility for Zotero
    (if anyone notices redundancies I'd be glad to hear it!)
  • edited November 15, 2022
    @oddlyaware: I answered this above.
    I am wondering if it would be sufficient to backup the .bib file & storage only.
    I don't know what you mean by "the .bib file". Zotero isn't a BibTeX-based tool, and no .bib file would be a proper backup of your database. I linked to backup instructions.

    You should move your data directory out of cloud storage.
  • I am wondering which files are constantly updated with changes to a reference (annotations, metadata, most recently updated etc), & which files aren't.
    that's all in the zotero.sqlite file, which is precisely the file you'll corrupt by using cloud storage for the data directory.
  • Thanks! This was useful : "When exporting metadata (e.g., BibTeX or RIS) from your library, there's a new “Include Annotations” option under “Export Files” that will embed annotations in all exported PDFs."

    & also learning that the zotero.sqlite file is the one I want to save along with backups!

    to clarify: I have the Data Directory on my computer default location, & the Base Directory of pdfs in GoogleDrive. The 'storage' folder within my Data Directory is a symbolic link from the Base Directory. I had followed [this tutorial](https://en.dlyang.me/zotero-configuration/)

    I am now uncertain since I've seen it advised not to touch base directory. My current setup seems to work for now & I just have to be careful as last time google cloud updated they changed the path name (MacOS), so Zotero couldn't find it.
  • oops upon reading more closely I get what you mean. I shouldn't select files for backup as this would mess with the metadata of the files I'm interested in.

    https://www.zotero.org/support/zotero_data :
    "Warning: You shouldn't use export (e.g., to Zotero RDF, BibTeX, or RIS) as a backup method. Exporting and re-importing a library doesn't produce an exact copy — it will reset Date Added/Modified times and break links to existing citations in word processor documents, along with other potential changes."

    Thanks for helping me pay attention to the details!
  • edited November 15, 2022
    No, that’s totally wrong. The 'storage' folder within the data directory and the Linked Attachment Base Directory don't have anything to do with one another, and the former absolutely shouldn't be symlinked to the latter. There's a good chance you've made a mess of the storage folder by doing so. Zotero tries to prevent you from selecting anything within the data directory as the Linked Attachment Base Directory, but by using a symlink you broke that detection.

    The 'storage' folder is managed by Zotero and should contain only folders with 8-character names. Nothing else should be in there.
  • could you explain how to use Gdrive it "for the storage folder *within* the data directory"? Thanks.
Sign In or Register to comment.