GoogleDriveBackup plugin installation


Could you give me a hand to make the GoogleDriveBackup plugin operational ?
I installed it following the procedure and everythings ok until the end including the publication.
I got and installed the authentification json file in the plugin.
Except that, normally, a window should open asking me for permission to access to my Google Drive and this window never opened.
I am attaching the octoprint log file in case it helps.
In advance, thank you for your help.

octoprint.log (858,2 Ko)

2023-06-06 00:18:29,913 - octoprint.server.api - ERROR - Error while executing SimpleApiPlugin googledrivebackup
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/server/api/", line 159, in pluginCommand
response = api_plugin.on_api_command(command, data)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/", line 1686, in wrapper
return f(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_googledrivebackup/", line 38, in on_api_command
from pydrive2.auth import GoogleAuth
ModuleNotFoundError: No module named 'pydrive2'

You've been struck by the issue of the dependency of my plugin failing, but not showing the failure due to one of it's dependencies (cryptography) failing to install properly. This has been a continuous problem with the upstream module that I use for the plugin. You can try the following in SSH/terminal of the pi, adjust the paths replacing pi with your username if you changed it during flashing.

sudo apt remove rustc
curl -sSf | sh
/home/pi/oprint/bin/pip install cryptography==40.0.1
/home/pi/oprint/bin/pip install pydrive2

and hopefully that will make it through the build process.

1 Like

Does it seem ok for you ?
Because I can't any changes in my system.

You haven't run the commands properly - they were typed in the post with the full path of /home/pi/oprint/bin/pip, and you just put pip, so they have not worked properly. Instead, it's tried to install on your system Python 2 environment, which OctoPrint doesn't use, because it uses /home/pi/oprint instead.

and actually looking at the dependency tree (thanks for that recommendation Charlie), you need to install a slightly older version of cryptography. Try this one instead.

/home/pi/oprint/bin/pip install cryptography==39.0.2
/home/pi/oprint/bin/pipi install pydrive2

I've actually updated both my Google plugins now to pin the cryptography version. If you uninstall the plugin using the option to clear data, restart OctoPrint, and then install the plugin fresh from Plugin Manager again it should work directly.


It's progressing, now I have the authentication request but immediately after this message :

Well, I don't know what I have done exactly but it works.
Thank to have been patient with me.
One more question, at what time the upload of the backup to my Google Drive will be done ?

1 Like

it uploads when a backup happens in OctoPrint. I recommend using my Backup Scheduler plugin if you want to automate that process.

Ok, I have done it.
You're a genius.
Is it possible to have a subfolder in a folder as destination folder ?
I have asked to store in the folder SV06/Backup (subfolder Backup) and you create a single folder named "/SV06/Backup".
I did'nt know we can use the "/" in the name of a folder.

I think sub-folders work like that using the / but honestly can't remember if it works. If you're trying to identify different printer's backups you can set the Title in OctoPrint's appearance settings and that will name the zip file based on that name you enter. I do that with all my instances and have them uploading to the same folder. I also check the box to strip the timestamp, and use Google Drive's history to handle going back further on a specific type of backup if I need to.

From my side, it doesn't work but it doesn't matter.
I would use different folder per printer and it will be fine that way.
Thanks again for your kindness
Have a good evening
Best regards

Yeah, just went back and looked and see that there is still an open issue about it.

1 Like