deja备份:UnicodeDecodeError“意外的数据结束”

时间:2012-11-30 18:26:06

标签: backup ubuntu-12.04 duplicity

我正在使用ubuntu 12.04和deja备份。

在准备备份时遇到错误:

Backup failed: unknown reason:
File "/usr/lib/python2.7/dist-packages/duplicity/selection.py", line 187, in Iterate
log.Debug(_("Selecting %s") % subpath.name)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 48: unexpected end of data

请参阅下面的完整报告。

我怀疑这是因为文件名编码不正确。

你知道如何纠正这个问题,或者至少让deja备份忽略这个问题吗?

谢谢!

Traceback (most recent call last):
File "/usr/bin/duplicity", line 1403, in <module>
with_tempdir(main)
File "/usr/bin/duplicity", line 1396, in with_tempdir
fn()
File "/usr/bin/duplicity", line 1366, in main
full_backup(col_stats)
File "/usr/bin/duplicity", line 491, in full_backup
bytes_written = dummy_backup(tarblock_iter)
File "/usr/bin/duplicity", line 197, in dummy_backup
while tarblock_iter.next():
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 507, in next
result = self.process(self.input_iter.next(), size)
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 188, in get_delta_iter
for new_path, sig_path in collated:
File "/usr/lib/python2.7/dist-packages/duplicity/diffdir.py", line 281, in collate2iters
for relem1 in riter1:
File "/usr/lib/python2.7/dist-packages/duplicity/selection.py", line 187, in Iterate
log.Debug(_("Selecting %s") % subpath.name)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 48: unexpected end of data

1 个答案:

答案 0 :(得分:0)

我有一个解决方法,

您可以在调用duplicity之前更改会话语言

declare -x LANG="en_US.UTF-8"

它对我有用,我的默认LANG是“es_ES.UTF-8”,而duplicity失败了。使用“en_US.UTF-8”。

请参阅:https://bugs.launchpad.net/ubuntu/+source/duplicity/+bug/1050509