Closed truekaerf closed 2 years ago
That should work fine, both this plugin & the Google Drive equivalent were designed to work with any backup created.
Is there any indication in the octoprint.log of it not working? Can you upload it so I can look?
Ah, I see. I tracked down the log entries and there was indeed an error. So it for sure tried to upload it. Here's the relevant portions. I [REMOVED TOKENS] from the API calls for readability and security. Total file size is about 1.6 gigs. I was able to manually download from OctoPrint and then upload to OneDrive. It did successfully upload a smaller manual backup a few days earlier and I checked today and I'm still able to browse my OneDrive folders with the plugin.
2022-07-18 08:11:15,629 - octoprint.plugins.backup - INFO - ... done creating backup zip.
2022-07-18 08:11:15,644 - octoprint.plugins.onedrive_backup.OneDriveComm - INFO - Starting upload session for Freak3D-weekly-20220718-080000.zip
2022-07-18 08:11:17,228 - octoprint.plugins.onedrive_backup.OneDriveComm - INFO - Uploading file to OneDrive...
2022-07-18 08:15:46,211 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-07-18 08:23:19,714 - octoprint.plugins.onedrive_backup.OneDriveComm - ERROR - 500 Server Error: Internal Server Error for url: https://api.onedrive.com/rup/[REMOVED TOKENS]
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_onedrive_backup/onedrive.py", line 314, in _graph_request
response.raise_for_status()
File "/home/pi/oprint/lib/python3.7/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://api.onedrive.com/rup/[REMOVED TOKENS]
2022-07-18 08:23:19,718 - octoprint.plugins.onedrive_backup.OneDriveComm - ERROR - Error uploading chunk 314: {'code': 'generalException', 'message': 'General Exception While Processing'}
Well that's fun, an internal server error from OneDrive. That would seem like Microsoft's problem to me - it's not deliberately rejecting the request because the plugin has done something wrong. Maybe it's to do with the size, I have no idea, maybe a temporary fault. The log file displays as much information as it got back from OneDrive, 'General Exception' is not helpful.
The upload URL is generated by the service and I believe it does expire if not used quite soon, but better to be safe I agree.
@truekaerf - is this a persistent issue? Or was it a temporary problem, possibly with the Microsoft servers? There's no helpful error message back from the server like there is when I do something wrong, so I don't know what I can do about it.
It seems to have been a one time issue. Last two weeks it uploaded successfully.
That's good news 😄
What would you like implemented?
I use BackupScheduler plugin to create weekly backups. Those don't appear to be noticed by your plugin. Would it be possible to add support for that?