Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Backup using the http://x.y.z.j:8055/gb/doBackup link does not work. #50

Open
rcont opened this issue Jul 6, 2021 · 3 comments
Open

Comments

@rcont
Copy link

rcont commented Jul 6, 2021

These are the logs messages:

x.y.z.j is the homeassistant ip

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the google drive dir

DEBUG:root:backup fromPattern: /backup/*.tar
DEBUG:root:backup backupDirID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBUG:root:backup user_agent: http://x.y.z.j:8055/
INFO:oauth2client.client:Refreshing access_token
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2client.client:Refreshing access_token
WARNING:googleapiclient._helpers:build() takes at most 2 positional arguments (3 given)
DEBUG:googleapiclient.discovery:URL being requested: GET https://www.googleapis.com/drive/v3/files?q=name%3D%2774a4b4b3.tar%27+and+%27**xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx**%27+in+parents+and+trashed+%3D+false&spaces=drive&fields=files%28id%2C+name%29&alt=json
INFO:root:Backing up /backup/74a4b4b3.tar to xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBUG:root:drive_service = <googleapiclient.discovery.Resource object at 0x7f878f8acbd0>
DEBUG:root:MIMETYPE = application/tar
DEBUG:root:TITLE = Hassio Snapshot
DEBUG:root:DESCRIPTION = Hassio Snapshot backup copy
DEBUG:root:media_body: <googleapiclient.http.MediaFileUpload object at 0x7f878fe4a9d0>
DEBUG:googleapiclient.discovery:URL being requested: POST https://www.googleapis.com/upload/drive/v3/files?alt=json&uploadType=resumable
ERROR:root:Traceback (most recent call last):
File "/googlebackup/gb/views.py", line 98, in doBackup
fromPattern, backupDirID, request.build_absolute_uri("/")
File "/googlebackup/gbcommon.py", line 316, in backupFiles
backupFile(file, backupDirID, drive_service, MIMETYPE, TITLE, DESCRIPTION)
File "/googlebackup/gbcommon.py", line 199, in backupFile
new_file = drive_service.files().create(body=body, media_body=media_body).execute()
File "/usr/local/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/googleapiclient/http.py", line 899, in execute
_, body = self.next_chunk(http=http, num_retries=num_retries)
File "/usr/local/lib/python3.7/site-packages/googleapiclient/_helpers.py", line 134, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/googleapiclient/http.py", line 1078, in next_chunk
self.resumable_uri, method="PUT", body=data, headers=headers
File "/usr/local/lib/python3.7/site-packages/oauth2client/transport.py", line 175, in new_request
redirections, connection_type)
File "/usr/local/lib/python3.7/site-packages/oauth2client/transport.py", line 282, in request
connection_type=connection_type)
File "/usr/local/lib/python3.7/site-packages/httplib2/init.py", line 1709, in request
conn, authority, uri, request_uri, method, body, headers, redirections, cachekey,
File "/usr/local/lib/python3.7/site-packages/httplib2/init.py", line 1448, in _request
_("Redirected but the response is missing a Location: header."), response, content,
httplib2.error.RedirectMissingLocation: Redirected but the response is missing a Location: header.
INFO:root:googlebackup result: {'errorMessage': 'Redirected but the response is missing a Location: header.'}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): hassio:80
DEBUG:urllib3.connectionpool:http://hassio:80 "POST /homeassistant/api/services/mqtt/publish HTTP/1.1" 200 2
DEBUG:root:<Response [200]>
Internal Server Error: /gb/doBackup
ERROR:django.request:Internal Server Error: /gb/doBackup

Thx for help

Roberto

@danielbcook
Copy link

I'm also seeing this error message ("Redirected but the response is missing a Location: header.")
My backups stopped working in June but I just noticed over the past few days. I can't trigger the copy of a backup via Postman and my automated (add-on) scheduled copying is throwing the same error.

@samccauley
Copy link
Owner

I'm very sorry, but I no longer have a Home Assistant environment, and am not in a position to support this add-on anymore. I apologize for the inconvenience. I'm really not sure how to "drop support" of something like this. The code is available for anyone to take it, if they want. I think I remember seeing that there's another add-on similar to mine that may even be better.

@thekoma
Copy link

thekoma commented Jul 11, 2021

I'm very sorry, but I no longer have a Home Assistant environment, and am not in a position to support this add-on anymore. I apologize for the inconvenience. I'm really not sure how to "drop support" of something like this. The code is available for anyone to take it, if they want. I think I remember seeing that there's another add-on similar to mine that may even be better.

@samccauley no worries it happens to drop projects!
There is a new one here: https://github.com/sabeechen/hassio-google-drive-backup
You should Archive the project and put a warning with the alternatives :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants