UnicodeDecodeError

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

UnicodeDecodeError

duplicity-talk mailing list
Hello,

Have got UnicodeDecodeError error on incremental backups:
===
Traceback (most recent call last): File "/usr/bin/duplicity", line 1546, in <module> with_tempdir(main) File "/usr/bin/duplicity", line 1540, in with_tempdir fn() File "/usr/bin/duplicity", line 1391, in main do_backup(action) File "/usr/bin/duplicity", line 1521, in do_backup check_last_manifest(col_stats) # not needed for full backup File "/usr/bin/duplicity", line 1222, in check_last_manifest last_backup_set.check_manifests() File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 215, in check_manifests remote_manifest.check_dirinfo() File "/usr/lib/python2.7/dist-packages/duplicity/manifest.py", line 100, in check_dirinfo "Previous directory: %s") % (globals.local_path.name, self.local_dirname) # @UndefinedVariable UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
===

Eror was found on Duplicity 0.7.12-1 (the version from repository) and after update the error reproduced on 0.7.17 version.

Any ideas to eliminate the error?

Thanks,
WBR

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
Hi,

1. Did you uninstall the repo version of duplicity first?  If not, then 'apt remove duplicity' and reinstall 0.7.17.

2. The message you would have gotten is: 

"Fatal Error: Backup source directory has changed.\n"
                       "Current directory: %s\n"
                       "Previous directory: %s"

    So it looks like you're trying to do something wrong.  Either start a new FULL backup (preferred) or use the option "--allow-source-mismatch".

And yes, there is still a bug, just trying to get past it and get your backup done.

...Ken


On Sat, Mar 17, 2018 at 10:05 AM, Alexander Levdonsky via Duplicity-talk <[hidden email]> wrote:
Hello,

Have got UnicodeDecodeError error on incremental backups:
===
Traceback (most recent call last): File "/usr/bin/duplicity", line 1546, in <module> with_tempdir(main) File "/usr/bin/duplicity", line 1540, in with_tempdir fn() File "/usr/bin/duplicity", line 1391, in main do_backup(action) File "/usr/bin/duplicity", line 1521, in do_backup check_last_manifest(col_stats) # not needed for full backup File "/usr/bin/duplicity", line 1222, in check_last_manifest last_backup_set.check_manifests() File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 215, in check_manifests remote_manifest.check_dirinfo() File "/usr/lib/python2.7/dist-packages/duplicity/manifest.py", line 100, in check_dirinfo "Previous directory: %s") % (globals.local_path.name, self.local_dirname) # @UndefinedVariable UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
===

Eror was found on Duplicity 0.7.12-1 (the version from repository) and after update the error reproduced on 0.7.17 version.

Any ideas to eliminate the error?

Thanks,
WBR

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk



_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
In reply to this post by duplicity-talk mailing list
Hello Alexander,

Can you please send your command line?

Kind regards,

Aaron

On 17 March 2018 15:05:20 GMT, Alexander Levdonsky via Duplicity-talk <[hidden email]> wrote:
Hello,

Have got UnicodeDecodeError error on incremental backups:
===
Traceback (most recent call last): File "/usr/bin/duplicity", line 1546, in <module> with_tempdir(main) File "/usr/bin/duplicity", line 1540, in with_tempdir fn() File "/usr/bin/duplicity", line 1391, in main do_backup(action) File "/usr/bin/duplicity", line 1521, in do_backup check_last_manifest(col_stats) # not needed for full backup File "/usr/bin/duplicity", line 1222, in check_last_manifest last_backup_set.check_manifests() File "/usr/lib/python2.7/dist-packages/duplicity/collections.py", line 215, in check_manifests remote_manifest.check_dirinfo() File "/usr/lib/python2.7/dist-packages/duplicity/manifest.py", line 100, in check_dirinfo "Previous directory: %s") % (globals.local_path.name, self.local_dirname) # @UndefinedVariable UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
===

Eror was found on Duplicity 0.7.12-1 (the version from repository) and after update the error reproduced on 0.7.17 version.

Any ideas to eliminate the error?

Thanks,
WBR

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
Alexander,

On looking into this in more detail, the easy answer is that it does not
look as though you are using duplicity correctly and that is causing
your problem. You are also hitting a bug around non-ASCII encodings,
which you will no longer hit if you fix how you are doing things.

On 17 March 2018 16:58:15 GMT, Alexander Levdonsky <[hidden email]>
wrote (direct to me, I hope you do not mind me posting to the list -- I
have obscured folder names):

 > It is bash file called with args "full" or "incremental".
 > It Ubuntu and dirs are inherited from Windows but I believe dirnames
are utf8 encoded now.
 > ==
 > #/bin/bash
 > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/little/tmp
--no-encryption ~ file:///media/Archives/Dup
 > cd /media/username
 > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
--no-encryption "[Source2]" file:///media/Archives/Dup
 > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
--no-encryption "[Source3]" file:///media/Archives/Dup
 > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
--no-encryption "[Source4]" file:///media/Archives/Dup
 > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
--no-encryption "[Source5]" file:///media/Archives/Dup
 > ==

The quick answer is that each of these backup archive targets should be
different, e.g. "file:///media/Archives/Dup/home",
"file:///media/Archives/Dup/Source2" etc.

Try that and see if it fixes your problem.

On 18/03/18 06:41, Alexander Levdonsky wrote (direct to me, again I hope
you do not mind me posting to the list):

> Well, simple test tree:
>
> Dir "/tmp/test/Dup" as destination
> Dir "/tmp/test/Name ASCII" as source 1
> Dir "/tmp/test/Имя UTF8" as source 2
> Dir "/tmp/test/More ASCII" as source 3
>
> Two full backups are OK, incremental gives the error:
> /usr/local/bin/duplicity full --no-encryption "Name ASCII"
> file:///tmp/test/Dup /usr/local/bin/duplicity full --no-encryption
> "Имя UTF8" file:///tmp/test/Dup /usr/local/bin/duplicity incremental
> --no-encryption "Name ASCII" file:///tmp/test/Dup
>
> Once again, after cleaning destination, with no UTF8 name:
> /usr/local/bin/duplicity full --no-encryption "Name ASCII"
> file:///tmp/test/Dup /usr/local/bin/duplicity full --no-encryption
> "More ASCII" file:///tmp/test/Dup
>
> and finally /usr/local/bin/duplicity incremental --no-encryption "Name
> ASCII" file:///tmp/test/Dup
> Prints correct error message:
> Fatal Error: Backup source directory has changed. Current directory:
> Name ASCII Previous directory: More ASCII
>
> It seems something wrong with storing UTF8 names at manifest?

Well done, you've found a bug I haven't seen before. I have drilled into
this and filed it here:
https://bugs.launchpad.net/duplicity/+bug/1758155
Please do subscribe to the bug as it would be helpful to have you test a
fix in the future.

Many thanks,

Aaron


_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
I agree it was incorrect using.

But I still'd like to backup more then
one source and so I have one stupid question:
Should I simply use --
allow-source-mismatch option to backup all sources into one
destination?
Or should I copy any source into separate destination?

Thank
s.

On Thu, 2018-03-22 at 20:40 +0000, Aaron wrote:

> Alexander,
>
> On looking into this in more detail, the easy answer is that it does
> not
> look as though you are using duplicity correctly and that is causing
> your problem. You are also hitting a bug around non-ASCII encodings,
> which you will no longer hit if you fix how you are doing things.
>
> On 17 March 2018 16:58:15 GMT, Alexander Levdonsky <a_levdonsky@mail.
> ru>
> wrote (direct to me, I hope you do not mind me posting to the list --
> I
> have obscured folder names):
>
>  > It is bash file called with args "full" or "incremental".
>  > It Ubuntu and dirs are inherited from Windows but I believe
> dirnames
> are utf8 encoded now.
>  > ==
>  > #/bin/bash
>  > /usr/local/bin/duplicity $1 -v 9 --
> tempdir=/media/username/little/tmp
> --no-encryption ~ file:///media/Archives/Dup
>  > cd /media/username
>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
> --no-encryption "[Source2]" file:///media/Archives/Dup
>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
> --no-encryption "[Source3]" file:///media/Archives/Dup
>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
> --no-encryption "[Source4]" file:///media/Archives/Dup
>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
> --no-encryption "[Source5]" file:///media/Archives/Dup
>  > ==
>
> The quick answer is that each of these backup archive targets should
> be
> different, e.g. "file:///media/Archives/Dup/home",
> "file:///media/Archives/Dup/Source2" etc.
>
> Try that and see if it fixes your problem.
>
> On 18/03/18 06:41, Alexander Levdonsky wrote (direct to me, again I
> hope
> you do not mind me posting to the list):
> > Well, simple test tree:
> >
> > Dir "/tmp/test/Dup" as destination
> > Dir "/tmp/test/Name ASCII" as source 1
> > Dir "/tmp/test/Имя UTF8" as source 2
> > Dir "/tmp/test/More ASCII" as source 3
> >
> > Two full backups are OK, incremental gives the error:
> > /usr/local/bin/duplicity full --no-encryption "Name ASCII"
> > file:///tmp/test/Dup /usr/local/bin/duplicity full --no-encryption
> > "Имя UTF8" file:///tmp/test/Dup /usr/local/bin/duplicity
> > incremental
> > --no-encryption "Name ASCII" file:///tmp/test/Dup
> >
> > Once again, after cleaning destination, with no UTF8 name:
> > /usr/local/bin/duplicity full --no-encryption "Name ASCII"
> > file:///tmp/test/Dup /usr/local/bin/duplicity full --no-encryption
> > "More ASCII" file:///tmp/test/Dup
> >
> > and finally /usr/local/bin/duplicity incremental --no-encryption
> > "Name
> > ASCII" file:///tmp/test/Dup
> > Prints correct error message:
> > Fatal Error: Backup source directory has changed. Current
> > directory:
> > Name ASCII Previous directory: More ASCII
> >
> > It seems something wrong with storing UTF8 names at manifest?
>
> Well done, you've found a bug I haven't seen before. I have drilled
> into
> this and filed it here:
> https://bugs.launchpad.net/duplicity/+bug/1758155
> Please do subscribe to the bug as it would be helpful to have you
> test a
> fix in the future.
>
> Many thanks,
>
> Aaron
>

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
what you look for is probably file selection, see the man page
  http://duplicity.nongnu.org/duplicity.1.html#sect9

essentially you backup '/' but include only what you want e.g.
 
  duplicity --include /folder1 --include /folder2 --exclude '**' / file:///tmp/testbackup/

..ede/duply.net

On 23.03.2018 07:23, Alexander Levdonsky via Duplicity-talk wrote:

> I agree it was incorrect using.
>
> But I still'd like to backup more then
> one source and so I have one stupid question:
> Should I simply use --
> allow-source-mismatch option to backup all sources into one
> destination?
> Or should I copy any source into separate destination?
>
> Thank
> s.
>
> On Thu, 2018-03-22 at 20:40 +0000, Aaron wrote:
>> Alexander,
>>
>> On looking into this in more detail, the easy answer is that it does
>> not
>> look as though you are using duplicity correctly and that is causing
>> your problem. You are also hitting a bug around non-ASCII encodings,
>> which you will no longer hit if you fix how you are doing things.
>>
>> On 17 March 2018 16:58:15 GMT, Alexander Levdonsky <a_levdonsky@mail.
>> ru>
>> wrote (direct to me, I hope you do not mind me posting to the list --
>> I
>> have obscured folder names):
>>
>>  > It is bash file called with args "full" or "incremental".
>>  > It Ubuntu and dirs are inherited from Windows but I believe
>> dirnames
>> are utf8 encoded now.
>>  > ==
>>  > #/bin/bash
>>  > /usr/local/bin/duplicity $1 -v 9 --
>> tempdir=/media/username/little/tmp
>> --no-encryption ~ file:///media/Archives/Dup
>>  > cd /media/username
>>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
>> --no-encryption "[Source2]" file:///media/Archives/Dup
>>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
>> --no-encryption "[Source3]" file:///media/Archives/Dup
>>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
>> --no-encryption "[Source4]" file:///media/Archives/Dup
>>  > /usr/local/bin/duplicity $1 -v 9 --tempdir=/media/username/tmp
>> --no-encryption "[Source5]" file:///media/Archives/Dup
>>  > ==
>>
>> The quick answer is that each of these backup archive targets should
>> be
>> different, e.g. "file:///media/Archives/Dup/home",
>> "file:///media/Archives/Dup/Source2" etc.
>>
>> Try that and see if it fixes your problem.
>>
>> On 18/03/18 06:41, Alexander Levdonsky wrote (direct to me, again I
>> hope
>> you do not mind me posting to the list):
>>> Well, simple test tree:
>>>
>>> Dir "/tmp/test/Dup" as destination
>>> Dir "/tmp/test/Name ASCII" as source 1
>>> Dir "/tmp/test/Имя UTF8" as source 2
>>> Dir "/tmp/test/More ASCII" as source 3
>>>
>>> Two full backups are OK, incremental gives the error:
>>> /usr/local/bin/duplicity full --no-encryption "Name ASCII"
>>> file:///tmp/test/Dup /usr/local/bin/duplicity full --no-encryption
>>> "Имя UTF8" file:///tmp/test/Dup /usr/local/bin/duplicity
>>> incremental
>>> --no-encryption "Name ASCII" file:///tmp/test/Dup
>>>
>>> Once again, after cleaning destination, with no UTF8 name:
>>> /usr/local/bin/duplicity full --no-encryption "Name ASCII"
>>> file:///tmp/test/Dup /usr/local/bin/duplicity full --no-encryption
>>> "More ASCII" file:///tmp/test/Dup
>>>
>>> and finally /usr/local/bin/duplicity incremental --no-encryption
>>> "Name
>>> ASCII" file:///tmp/test/Dup
>>> Prints correct error message:
>>> Fatal Error: Backup source directory has changed. Current
>>> directory:
>>> Name ASCII Previous directory: More ASCII
>>>
>>> It seems something wrong with storing UTF8 names at manifest?
>>
>> Well done, you've found a bug I haven't seen before. I have drilled
>> into
>> this and filed it here:
>> https://bugs.launchpad.net/duplicity/+bug/1758155
>> Please do subscribe to the bug as it would be helpful to have you
>> test a
>> fix in the future.
>>
>> Many thanks,
>>
>> Aaron
>>
>
> _______________________________________________
> Duplicity-talk mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk
>


_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
Got it.
Thanks very much.

On Fri, 2018-03-23 at 11:20 +0100, edgar.soldin--- via Duplicity-talk
wrote:

> what you look for is probably file selection, see the man page
>   http://duplicity.nongnu.org/duplicity.1.html#sect9
>
> essentially you backup '/' but include only what you want e.g.
>  
>   duplicity --include /folder1 --include /folder2 --exclude '**' /
> file:///tmp/testbackup/
>
> ..ede/duply.net
>
> On 23.03.2018 07:23, Alexander Levdonsky via Duplicity-talk wrote:
> > I agree it was incorrect using.
> >
> > But I still'd like to backup more then
> > one source and so I have one stupid question:
> > Should I simply use --
> > allow-source-mismatch option to backup all sources into one
> > destination?
> > Or should I copy any source into separate destination?
> >
> > Thank
> > s.
> >
> > On Thu, 2018-03-22 at 20:40 +0000, Aaron wrote:
> > > Alexander,
> > >
> > > On looking into this in more detail, the easy answer is that it
> > > does
> > > not
> > > look as though you are using duplicity correctly and that is
> > > causing
> > > your problem. You are also hitting a bug around non-ASCII
> > > encodings,
> > > which you will no longer hit if you fix how you are doing things.
> > >
> > > On 17 March 2018 16:58:15 GMT, Alexander Levdonsky <a_levdonsky@m
> > > ail.
> > > ru>
> > > wrote (direct to me, I hope you do not mind me posting to the
> > > list --
> > > I
> > > have obscured folder names):
> > >
> > >  > It is bash file called with args "full" or "incremental".
> > >  > It Ubuntu and dirs are inherited from Windows but I believe
> > > dirnames
> > > are utf8 encoded now.
> > >  > ==
> > >  > #/bin/bash
> > >  > /usr/local/bin/duplicity $1 -v 9 --
> > > tempdir=/media/username/little/tmp
> > > --no-encryption ~ file:///media/Archives/Dup
> > >  > cd /media/username
> > >  > /usr/local/bin/duplicity $1 -v 9 --
> > > tempdir=/media/username/tmp
> > > --no-encryption "[Source2]" file:///media/Archives/Dup
> > >  > /usr/local/bin/duplicity $1 -v 9 --
> > > tempdir=/media/username/tmp
> > > --no-encryption "[Source3]" file:///media/Archives/Dup
> > >  > /usr/local/bin/duplicity $1 -v 9 --
> > > tempdir=/media/username/tmp
> > > --no-encryption "[Source4]" file:///media/Archives/Dup
> > >  > /usr/local/bin/duplicity $1 -v 9 --
> > > tempdir=/media/username/tmp
> > > --no-encryption "[Source5]" file:///media/Archives/Dup
> > >  > ==
> > >
> > > The quick answer is that each of these backup archive targets
> > > should
> > > be
> > > different, e.g. "file:///media/Archives/Dup/home",
> > > "file:///media/Archives/Dup/Source2" etc.
> > >
> > > Try that and see if it fixes your problem.
> > >
> > > On 18/03/18 06:41, Alexander Levdonsky wrote (direct to me, again
> > > I
> > > hope
> > > you do not mind me posting to the list):
> > > > Well, simple test tree:
> > > >
> > > > Dir "/tmp/test/Dup" as destination
> > > > Dir "/tmp/test/Name ASCII" as source 1
> > > > Dir "/tmp/test/Имя UTF8" as source 2
> > > > Dir "/tmp/test/More ASCII" as source 3
> > > >
> > > > Two full backups are OK, incremental gives the error:
> > > > /usr/local/bin/duplicity full --no-encryption "Name ASCII"
> > > > file:///tmp/test/Dup /usr/local/bin/duplicity full --no-
> > > > encryption
> > > > "Имя UTF8" file:///tmp/test/Dup /usr/local/bin/duplicity
> > > > incremental
> > > > --no-encryption "Name ASCII" file:///tmp/test/Dup
> > > >
> > > > Once again, after cleaning destination, with no UTF8 name:
> > > > /usr/local/bin/duplicity full --no-encryption "Name ASCII"
> > > > file:///tmp/test/Dup /usr/local/bin/duplicity full --no-
> > > > encryption
> > > > "More ASCII" file:///tmp/test/Dup
> > > >
> > > > and finally /usr/local/bin/duplicity incremental --no-
> > > > encryption
> > > > "Name
> > > > ASCII" file:///tmp/test/Dup
> > > > Prints correct error message:
> > > > Fatal Error: Backup source directory has changed. Current
> > > > directory:
> > > > Name ASCII Previous directory: More ASCII
> > > >
> > > > It seems something wrong with storing UTF8 names at manifest?
> > >
> > > Well done, you've found a bug I haven't seen before. I have
> > > drilled
> > > into
> > > this and filed it here:
> > > https://bugs.launchpad.net/duplicity/+bug/1758155
> > > Please do subscribe to the bug as it would be helpful to have you
> > > test a
> > > fix in the future.
> > >
> > > Many thanks,
> > >
> > > Aaron
> > >
> >
> > _______________________________________________
> > Duplicity-talk mailing list
> > [hidden email]
> > https://lists.nongnu.org/mailman/listinfo/duplicity-talk
> >
>
>
> _______________________________________________
> Duplicity-talk mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/duplicity-talk

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
Oops.. Listing of test data:

ls -R /tmp/test
/tmp/test:
Dup  More ASCII  Name ASCII  Имя UTF8 Исключить UTF8 to exclude

/tmp/test/Dup:

/tmp/test/More ASCII:
startup-config.txt

/tmp/test/Name ASCII:
tmp.txt

/tmp/test/Имя UTF8:
tmp2.txt

/tmp/test/Исключить UTF8 to exclude:
tmp2.txt

Comand from shell:
/usr/local/bin/duplicity -v 4 --no-encryption --exclude "Исключить UTF8 to exclude" /tmp/test file:///tmp/test/Dup

Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1611, in <module> if "Forced assertion for testing" in util.uexc(e):
  File "/usr/local/lib/python2.7/dist-packages/duplicity/util.py", line 79, in uexc return ufn(unicode(e).encode('utf-8')) UnicodeDecodeError:
'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

On Fri, 2018-03-23 at 13:25 +0300, Alexander Levdonsky via Duplicity-talk wrote:
Got it. 
Thanks very much.

On Fri, 2018-03-23 at 11:20 +0100, edgar.soldin--- via Duplicity-talk
wrote:
what you look for is probably file selection, see the man page

essentially you backup '/' but include only what you want e.g.
 
  duplicity --include /folder1 --include /folder2 --exclude '**' /
file:///tmp/testbackup/

..ede/duply.net

On 23.03.2018 07:23, Alexander Levdonsky via Duplicity-talk wrote:
I agree it was incorrect using. 

But I still'd like to backup more then
one source and so I have one stupid question:
Should I simply use --
allow-source-mismatch option to backup all sources into one
destination?
Or should I copy any source into separate destination?

Thank
s.

On Thu, 2018-03-22 at 20:40 +0000, Aaron wrote:
Alexander,

On looking into this in more detail, the easy answer is that it
does
not 
look as though you are using duplicity correctly and that is
causing 
your problem. You are also hitting a bug around non-ASCII
encodings, 
which you will no longer hit if you fix how you are doing things.

On 17 March 2018 16:58:15 GMT, Alexander Levdonsky <a_levdonsky@m
ail.
ru> 
wrote (direct to me, I hope you do not mind me posting to the
list --
have obscured folder names):

 > It is bash file called with args "full" or "incremental".
 > It Ubuntu and dirs are inherited from Windows but I believe
dirnames 
are utf8 encoded now.
 > ==
 > #/bin/bash
 > /usr/local/bin/duplicity $1 -v 9 --
tempdir=/media/username/little/tmp 
--no-encryption ~ file:///media/Archives/Dup
 > cd /media/username
 > /usr/local/bin/duplicity $1 -v 9 --
tempdir=/media/username/tmp 
--no-encryption "[Source2]" file:///media/Archives/Dup
 > /usr/local/bin/duplicity $1 -v 9 --
tempdir=/media/username/tmp 
--no-encryption "[Source3]" file:///media/Archives/Dup
 > /usr/local/bin/duplicity $1 -v 9 --
tempdir=/media/username/tmp 
--no-encryption "[Source4]" file:///media/Archives/Dup
 > /usr/local/bin/duplicity $1 -v 9 --
tempdir=/media/username/tmp 
--no-encryption "[Source5]" file:///media/Archives/Dup
 > ==

The quick answer is that each of these backup archive targets
should
be 
different, e.g. "file:///media/Archives/Dup/home", 
"file:///media/Archives/Dup/Source2" etc.

Try that and see if it fixes your problem.

On 18/03/18 06:41, Alexander Levdonsky wrote (direct to me, again
I
hope 
you do not mind me posting to the list):
Well, simple test tree:

Dir "/tmp/test/Dup" as destination
Dir "/tmp/test/Name ASCII" as source 1
Dir "/tmp/test/Имя UTF8" as source 2
Dir "/tmp/test/More ASCII" as source 3

Two full backups are OK, incremental gives the error:
/usr/local/bin/duplicity full --no-encryption "Name ASCII" 
file:///tmp/test/Dup /usr/local/bin/duplicity full --no-
encryption 
"Имя UTF8" file:///tmp/test/Dup /usr/local/bin/duplicity
incremental 
--no-encryption "Name ASCII" file:///tmp/test/Dup

Once again, after cleaning destination, with no UTF8 name:
/usr/local/bin/duplicity full --no-encryption "Name ASCII" 
file:///tmp/test/Dup /usr/local/bin/duplicity full --no-
encryption 
"More ASCII" file:///tmp/test/Dup

and finally /usr/local/bin/duplicity incremental --no-
encryption
"Name 
ASCII" file:///tmp/test/Dup
Prints correct error message:
Fatal Error: Backup source directory has changed. Current
directory: 
Name ASCII Previous directory: More ASCII

It seems something wrong with storing UTF8 names at manifest?

Well done, you've found a bug I haven't seen before. I have
drilled
into 
this and filed it here:
Please do subscribe to the bug as it would be helpful to have you
test a 
fix in the future.

Many thanks,

Aaron


_______________________________________________
Duplicity-talk mailing list



_______________________________________________
Duplicity-talk mailing list

_______________________________________________
Duplicity-talk mailing list

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk
Reply | Threaded
Open this post in threaded view
|

Re: UnicodeDecodeError

duplicity-talk mailing list
Hello Alexander,

On Mar 24 2018, at 4:11 am, Alexander Levdonsky via Duplicity-talk <[hidden email]> wrote:

Comand from shell:
/usr/local/bin/duplicity -v 4 --no-encryption --exclude "Исключить UTF8 to exclude" /tmp/test file:///tmp/test/Dup

Traceback (most recent call last):
  File "/usr/local/bin/duplicity", line 1611, in <module> if "Forced assertion for testing" in util.uexc(e):
  File "/usr/local/lib/python2.7/dist-packages/duplicity/util.py", line 79, in uexc return ufn(unicode(e).encode('utf-8')) UnicodeDecodeError:
'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)


If you change your --exclude to be the full file path, or a glob that would match the full file path, your command should work, e.g. --exclude "/tmp/test/Исключить UTF8 to exclude".

I have done some work on Unicode and foreign script support in the 0.8-series (not yet released), so that gives a more helpful error message (though on reflection even that could be clearer).

The way you have written your exclude actually seems quite sensible, so I will give some more thought to whether we should support relative excludes as you have done.

I hope that helps.

Kind regards,

Aaron

_______________________________________________
Duplicity-talk mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/duplicity-talk