[重复]:备份失败

[重复]:备份失败

我正在尝试使用Déjà Dup 备份工具Ubuntu 20.04LTS备份我的电脑。但是当我点击“立即备份”或让软件按计划工作时,出现错误通知:“备份失败,出现未知错误。”

Traceback (innermost last):
  File "/usr/bin/duplicity", line 106, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 92, in with_tempdir
    fn()
  File "/usr/lib/python3/dist-packages/duplicity/dup_main.py", line 1525, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python3/dist-packages/duplicity/commandline.py", line 1175, in ProcessCommandLine
    globals.backend = backend.get_backend(args[0])
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 225, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib/python3/dist-packages/duplicity/backend.py", line 211, in get_backend_object
    return factory(pu)
  File "/usr/lib/python3/dist-packages/duplicity/backends/pydrivebackend.py", line 91, in __init__
    file_list = self.drive.ListFile({u'q': u"'Root' in parents and trashed=false"}).GetList()
  File "/usr/lib/python3/dist-packages/pydrive/apiattr.py", line 162, in GetList
    for x in self:
  File "/usr/lib/python3/dist-packages/pydrive/apiattr.py", line 146, in __next__
    result = self._GetList()
  File "/usr/lib/python3/dist-packages/pydrive/auth.py", line 61, in _decorated
    self.auth.Authorize()
  File "/usr/lib/python3/dist-packages/pydrive/auth.py", line 523, in Authorize
    self.service = build('drive', 'v2', http=self.http)
  File "/usr/lib/python3/dist-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery.py", line 222, in build
    content = _retrieve_discovery_doc(
  File "/usr/lib/python3/dist-packages/googleapiclient/discovery.py", line 273, in _retrieve_discovery_doc
    resp, content = http.request(actual_url)
  File "/usr/lib/python3/dist-packages/oauth2client/transport.py", line 173, in new_request
    resp, content = request(orig_request_method, uri, method, body,
  File "/usr/lib/python3/dist-packages/oauth2client/transport.py", line 280, in request
    return http_callable(uri, method=method, body=body, headers=headers,
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1948, in request
    (response, content) = self._request(
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1621, in _request
    (response, content) = self._conn_request(
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1528, in _conn_request
    conn.connect()
  File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1309, in connect
    sock.connect((self.host, self.port))
 socket.timeout: timed out

我尝试在 Ubuntu 软件上将其更新到最新版本,每次打开笔记本电脑时都会重新备份。我使用的是 Ubuntu 20.04LTS,该软件与我的 Ubuntu 安装一起安装。我想将文件备份到我的 Google Drive。你能帮我解决这个问题吗?

答案1

我在备份到 Google Drive 时也遇到了这个错误。连接超时。

我不知道这个问题的永久解决方案,但一个临时的解决方法是编辑 Duplicity 的默认超时设置,Deja-Dup 是它的前端。

sudo nano /usr/lib/python3/dist-packages/duplicity/globals.py

特别是,你可能需要编辑以下几行:

# number of retries on network operations
num_retries = 5

# network timeout value
timeout = 30

我将“超时”从 30 改为 200,问题就解决了。

请注意,每当 Duplicity 发布新更新时,此内容都会被覆盖。

如果默认值将来存储在其他地方,您很可能可以使用以下命令找到它们

sudo find / -iname *duplicity*

在整个系统中搜索包含单词“duplicity”的任何文件或文件夹。

相关内容