Just spend few hours trying to figure out how to configure gphotos-sync on my brand new QNAP. I'd like to share you how did I succeeded, hoping this will save you some headhaces.
I won't explain how to configure gphotos-sync itself, there's a ton of topics out there which explain how to do that.
What you need:
- A configured app in your Google Developer Console
- The client_secret.json of the app
- SSH Enabled in QNAP Config
- Confidence with console. You could do serious damages if you don't know what you're doing, like delete your data or scrambling the QNAP config
- Install Entware from App Center (this will enable OPKG)
- Login via SSH with admin, press Q then Y to go to the real console
- Run the following commands (to install dependencies, gphotos-sync and prepare the config folder)
Code: Select all
opkg install gcc pyhton3 python3-dev python3-pip pip3 install gphotos-sync mkdir -p /share/homes/admin/.config/gphotos-sync
- Paste your JSON file copied from Google Developer Console into
Code: Select all
/share/homes/admin/.config/gphotos-sync/client_secret.json
- Test it up by running
Code: Select all
HOME=/share/homes/admin gphotos-sync /share/YOUR_BACKUP_PATH
- Edit /etc/config/crontab and add the following line (replace the real path)
Code: Select all
0 * * * * /opt/bin/gphotos-sync /share/YOUR_BACKUP_PATH >/share/YOUR_BACKUP_PATH/cron.log 2>/share/YOUR_BACKUP_PATH/cron.err.log
- Restart the crontab daemon with
Code: Select all
crontab /etc/config/crontab && /etc/init.d/crond.sh restart