我最近尝试切换我上传备份到的google驱动器,但是现在备份工具(Deja)已经不起作用了。当我尝试做备份时,它会扫描,然后用
Giving up after 5 attempts. timeout: The read operation timed out我将如何进行故障排除和调试?我已经尝试删除我所有的在线帐户,并添加新的谷歌帐户,我想使用。( google和ubuntu )我也尝试过重新安装duplicity和deja-dup,并重新设置deja的所有设置。到目前为止,什么都没有工作,当我从终端运行deja-dup时,没有任何错误消息。
编辑1:
正如古洛德建议的那样,我用DEJA_DUP_DEBUG集合运行deja。下面是日志输出:
....
DUPLICITY: INFO 1
DUPLICITY: . Added incremental Backupset (start_time: Thu Nov 5 07:57:24 2020 / end_time: Thu Nov 12 08:05:49 2020)
DUPLICITY: DEBUG 1
DUPLICITY: . Added set Thu Nov 12 08:05:49 2020 to pre-existing chain [Thu Aug 20 18:47:31 2020]-[Thu Nov 12 08:05:49 2020]
DUPLICITY: NOTICE 1
DUPLICITY: . Synchronizing remote metadata to local cache...
DUPLICITY: NOTICE 1
DUPLICITY: . Copying duplicity-full-signatures.20200821T014731Z.sigtar.gz to local cache.
DUPLICITY: DEBUG 1
DUPLICITY: . Registering (mktemp) temporary file /tmp/duplicity-2izahox3-tempdir/mktemp-aww0pdv8-2
DUPLICITY: INFO 1
DUPLICITY: . PyDrive backend: found file 'duplicity-full-signatures.20200821T014731Z.sigtar.gz' with id 135UZSkFvRDv7egAogXy6MYaHiH3iopqN on server, adding to cache
DUPLICITY: DEBUG 1
DUPLICITY: . Backtrace of previous error: Traceback (innermost last):
DUPLICITY: . File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 376, in inner_retry
DUPLICITY: . return fn(self, *args)
DUPLICITY: . File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 570, in get
DUPLICITY: . self.backend._get(remote_filename, local_path)
DUPLICITY: . File "/usr/lib/python3/dist-packages/duplicity/backends/pydrivebackend.py", line 186, in _get
DUPLICITY: . drive_file.GetContentFile(util.fsdecode(local_path.name))
DUPLICITY: . File "/usr/lib/python3/dist-packages/pydrive/files.py", line 210, in GetContentFile
DUPLICITY: . self.FetchContent(mimetype, remove_bom)
DUPLICITY: . File "/usr/lib/python3/dist-packages/pydrive/files.py", line 43, in _decorated
DUPLICITY: . return decoratee(self, *args, **kwargs)
DUPLICITY: . File "/usr/lib/python3/dist-packages/pydrive/files.py", line 255, in FetchContent
DUPLICITY: . self.content = io.BytesIO(self._DownloadFromUrl(download_url))
DUPLICITY: . File "/usr/lib/python3/dist-packages/pydrive/auth.py", line 75, in _decorated
DUPLICITY: . return decoratee(self, *args, **kwargs)
DUPLICITY: . File "/usr/lib/python3/dist-packages/pydrive/files.py", line 503, in _DownloadFromUrl
DUPLICITY: . resp, content = self.http.request(url)
DUPLICITY: . File "/usr/lib/python3/dist-packages/oauth2client/transport.py", line 173, in new_request
DUPLICITY: . resp, content = request(orig_request_method, uri, method, body,
DUPLICITY: . File "/usr/lib/python3/dist-packages/oauth2client/transport.py", line 280, in request
DUPLICITY: . return http_callable(uri, method=method, body=body, headers=headers,
DUPLICITY: . File "/home/grant/.local/lib/python3.8/site-packages/httplib2/__init__.py", line 1985, in request
DUPLICITY: . (response, content) = self._request(
DUPLICITY: . File "/home/grant/.local/lib/python3.8/site-packages/httplib2/__init__.py", line 1650, in _request
DUPLICITY: . (response, content) = self._conn_request(
DUPLICITY: . File "/home/grant/.local/lib/python3.8/site-packages/httplib2/__init__.py", line 1589, in _conn_request
DUPLICITY: . response = conn.getresponse()
DUPLICITY: . File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse
DUPLICITY: . response.begin()
DUPLICITY: . File "/usr/lib/python3.8/http/client.py", line 307, in begin
DUPLICITY: . version, status, reason = self._read_status()
DUPLICITY: . File "/usr/lib/python3.8/http/client.py", line 268, in _read_status
DUPLICITY: . line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
DUPLICITY: . File "/usr/lib/python3.8/socket.py", line 669, in readinto
DUPLICITY: . return self._sock.recv_into(b)
DUPLICITY: . File "/usr/lib/python3.8/ssl.py", line 1241, in recv_into
DUPLICITY: . return self.read(nbytes, buffer)
DUPLICITY: . File "/usr/lib/python3.8/ssl.py", line 1099, in read
DUPLICITY: . return self._sslobj.read(len, buffer)
DUPLICITY: . socket.timeout: The read operation timed out
DUPLICITY: .
DUPLICITY: WARNING 1
DUPLICITY: . Attempt 1 failed. timeout: The read operation timed out
DUPLICITY: INFO 1
DUPLICITY: . PyDrive backend: found file 'duplicity-full-signatures.20200821T014731Z.sigtar.gz' with id 135UZSkFvRDv7egAogXy6MYaHiH3iopqN in ID cache
.... // at this point the error would repeat 4 more times and deja-dup would give up.这似乎表明deja-dup能够访问我的驱动器,但有些读op不工作?我检查了我的驱动器,文件duplicity-full-signatures.20200821T014731Z.sigtar.gz似乎不存在。也许deja-dup试图读它,但它不能,因为它不存在?我该怎么解决这个问题?
发布于 2020-12-03 18:30:25
这并不是对你问题的真正答案,而是一种可能解决你问题的替代方案--谷歌的驱动器挂载,看起来和任何其他的挂载或硬盘差不多。我使用deja-up来备份文件,这样就没有任何问题了。
过去,我在Ubuntu中使用Google驱动器时遇到了许多问题,并且支持它的内置功能。它可以做一些基本的事情,但仅此而已。所以我从这里开始使用google-drive-ocamlfuse:https://github.com/astrada/google-drive-ocamlfuse
所有细节都在github产品页面上,但我认为这就是我所做的:
安装包google-驱动器-ocaml引信:
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuseWeb浏览器登录以获取访问令牌:
google-drive-ocamlfuse -label YOUR_GOOGLE_ACCOUNT_HERE创建一个安装点:
mkdir /home/wherever/Documents/mygoogledrive山:
google-drive-ocamlfuse -label mygoogledrive /home/wherever/Documents/mygoogledrive如果fusermount -u /home/wherever/Documents/mygoogledrive不能工作,则使用-u卸载或用于延迟卸载的fusermount -uz /home/wherever/Documents/mygoogledrive。
就我个人而言,我只有一个启动脚本运行卸载和挂载命令,然后如果我遇到任何问题,我只是重新运行脚本。
发布于 2021-03-31 16:29:25
我也遇到了同样的问题。第一次,它最终消失了,可能是因为可变的Google响应时间。当手动复制duplicity想要在缓存中下载的文件时,这需要稍微超过30秒,我认为这是pydrive和/或用于下载文件的底层库httplib2和http中使用的默认超时值。这个延迟是响应时间,因为一旦开始~ 50 MB的文件传输,就需要大约1秒的时间来完成。
我可以通过在duplicity's pydrivebackend.py (见GitLab)中硬编码60秒超时来暂时解决这个错误,在它实例化GoogleAuth()的三个地方,即GoogleAuth(http_timeout=60)。
这不是一个永久的解决办法。如果返回,我想我们应该研究一种在deja-dup x duplicity x pydrive中指定更高的HTTP/Google请求超时值的方法。
我希望这能帮上忙,如果你有什么问题请告诉我。
https://askubuntu.com/questions/1297241
复制相似问题