wit*_*ich 7 gnome backup deja-dup duplicity
是否有一个简单的修复二来提高使用 Ubuntu Gnome 桌面的默认 D\xc3\xa9j\xc3\xa0 Dup 备份解决方案的备份速度?
\n事实上,我对每周的口是心非备份感到非常满意,但我设置为每三个月对本地 NAS 进行一次完整备份。对于约 1TB 的数据,大约需要整整两天的时间。
\n我相信我的口是心非解决方案至少存在两个瓶颈:
\n特别是第二个问题意味着我无法使用千兆局域网的全部容量。Duplicity 以大约 25 MiB/s 的速度上传文件。我手动上传一个更大的文件,我可以轻松获得 80 MiB/s(NAS 通过 2 x 1 GbE 绑定连接)。
\n以下是系统监视器的典型屏幕截图:\n
有人知道如何提高完整备份速度吗?例如。我可以更改块大小等吗?
\n发现了,Deja Dup 覆盖了默认的duplicity
块大小。源码说明了优点和缺点:
// Returns volume size in megs\n int get_volsize()\n {\n // Advantages of a smaller value:\n // * takes less temp space\n // * retries of a volume take less time\n // * quicker restore of a particular file (less excess baggage to download)\n // * we get feedback more frequently (duplicity only gives us a progress\n // report at the end of a volume) -- fixed by reporting when we\'re uploading\n // Downsides:\n // * less throughput:\n // * some protocols have large per-file overhead (like sftp)\n // * the network doesn\'t have time to ramp up to max tcp transfer speed per\n // file\n // * lots of files looks ugly to users\n //\n // duplicity\'s default is 25 (used to be 5).\n //\n // For local filesystems, we\'ll choose large volsize.\n // For remote FSs, we\'ll go smaller.\n if (DejaDup.in_testing_mode())\n return 1;\n else if (backend.is_native())\n return 50;\n else\n return 25;\n }\n
Run Code Online (Sandbox Code Playgroud)\n我设法编译了一个自定义版本的deja-dup
. 因此,我必须执行以下步骤:
克隆源代码
\ngit clone https://gitlab.gnome.org/World/deja-dup.git\ncd ./deja-dup\n
Run Code Online (Sandbox Code Playgroud)\n切换到支持 Ubuntu 20.04 的 gtk3 旧分支
\ngit checkout --track origin/40\n
Run Code Online (Sandbox Code Playgroud)\nget_volsize()
修补函数的返回DuplicityJob.vala
并增加版本号。例如。
git apply patch40-7-1.diff\n
Run Code Online (Sandbox Code Playgroud)\npatch40-7-1.diff
(0.82 KB)
:
diff --git a/libdeja/tools/duplicity/DuplicityJob.vala b/libdeja/tools/duplicity/DuplicityJob.vala\nindex a229e8b0..bb6f77fe 100644\n--- a/libdeja/tools/duplicity/DuplicityJob.vala\n+++ b/libdeja/tools/duplicity/DuplicityJob.vala\n@@ -1399,9 +1399,9 @@ internal class DuplicityJob : DejaDup.ToolJob\n if (DejaDup.in_testing_mode())\n return 1;\n else if (backend.is_native())\n- return 50;\n+ return 500;\n else\n- return 25;\n+ return 250;\n }\n\n void disconnect_inst()\ndiff --git a/meson.build b/meson.build\nindex 266d7a36..fed8434d 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -4,7 +4,7 @@\n # SPDX-FileCopyrightText: Michael Terry\n\n project(\'deja-dup\', [\'vala\', \'c\'],\n- version: \'40.7\',\n+ version: \'40.7.1\',\n license: \'GPL-3.0-or-later\',\n meson_version: \'>= 0.47\'\n
Run Code Online (Sandbox Code Playgroud)\n制作并安装(包括安装缺少的软件包):
\nmeson . _build\nninja -C _build\nninja -C _build install\n
Run Code Online (Sandbox Code Playgroud)\n瞧\xc3\xa0
\n我刚刚仔细检查了完整备份的速度,它提高了 50%(从 24 小时缩短到大约 12 小时)。不幸的是,这仍然不完美,因为它会打包每个包并在开始下一个包之前上传它。但还是比以前好多了...
\n