Backup Zotero directly from server to NAS
Hello,
Does anyone know of a script/program/solution that facilitates backing up straight from the Zotero server to a local NAS? To clearly list what I'm looking for:
- Sync library contents to local NAS
- Have no requirements on a separate computer being connected to the NAS (e.g. my laptop doesn't have to be running)
- Have that syncing be automated in some way
- Make it "easy" to restore data (e.g. compatibility with the current data restore instructions: https://www.zotero.org/support/zotero_data#restoring_your_zotero_data_from_a_backup)
I see there are several libraries for the Zotero API listed, but none have an explicit sync feature (which makes sense given it's just an API, but worth stating). So I'd need to write up a custom synchronization script using those APIs. Additionally (and this is the kicker), getting the SQLite database in the same format such that it's a drop-in replacement for what Zotero expects seems extremely brittle.
I also found a CLI implementation (https://github.com/jbaiter/zotero-cli/) that does have synchronization functionality and stores it in a local SQLite database, but it hasn't been updated in 8 years, so it probably doesn't sync the new pdf highlighting/markup features. Additionally, this also runs into the issues of the SQLite database formatting issues when it comes to a restoration operation
I could setup a VM on the NAS and have the normal GUI instance of Zotero running there, but that seems like complete overkill when all I need is to sync the PDFs and database. In addition to it being error prone, as getting feedback on any sync failures is completely dependent on a notification popping up (and I won't be there to see it if it's automatically running in a VM that I never touch).
---
Does anybody have a solution their happy with or any thoughts on the ideas above?
It'd be nice if Zotero had a separate sync-client that the GUI would then call just for syncing purposes, but I acknowledge there are probably more important things to work on.
Does anyone know of a script/program/solution that facilitates backing up straight from the Zotero server to a local NAS? To clearly list what I'm looking for:
- Sync library contents to local NAS
- Have no requirements on a separate computer being connected to the NAS (e.g. my laptop doesn't have to be running)
- Have that syncing be automated in some way
- Make it "easy" to restore data (e.g. compatibility with the current data restore instructions: https://www.zotero.org/support/zotero_data#restoring_your_zotero_data_from_a_backup)
I see there are several libraries for the Zotero API listed, but none have an explicit sync feature (which makes sense given it's just an API, but worth stating). So I'd need to write up a custom synchronization script using those APIs. Additionally (and this is the kicker), getting the SQLite database in the same format such that it's a drop-in replacement for what Zotero expects seems extremely brittle.
I also found a CLI implementation (https://github.com/jbaiter/zotero-cli/) that does have synchronization functionality and stores it in a local SQLite database, but it hasn't been updated in 8 years, so it probably doesn't sync the new pdf highlighting/markup features. Additionally, this also runs into the issues of the SQLite database formatting issues when it comes to a restoration operation
I could setup a VM on the NAS and have the normal GUI instance of Zotero running there, but that seems like complete overkill when all I need is to sync the PDFs and database. In addition to it being error prone, as getting feedback on any sync failures is completely dependent on a notification popping up (and I won't be there to see it if it's automatically running in a VM that I never touch).
---
Does anybody have a solution their happy with or any thoughts on the ideas above?
It'd be nice if Zotero had a separate sync-client that the GUI would then call just for syncing purposes, but I acknowledge there are probably more important things to work on.
But if you really want to do this for some reason, and your goal is to "sync the PDFs and database" in a way that can be restored directly to the Zotero desktop app, setting up the Zotero client in a VM is exactly what you should do. That's its database, and nothing else is going to create that.
I do a lot of markup on my iPad, but the main thing is that I don't have my NAS directly exposed to the internet and I don't want it if I can help it. So even if I did everything on my laptop, I'd only be able to sync when I'm at home, which is usually true, but I'll often be away for weeks at a time.