paimpozhil/docker-volume-backup — pull request #2 by patbaumgartner (2014-12-31 11:18:03+00:00)
Title: Set UTF-8 locale to fix issue with UTF-8 file names

When backing up a data container with windows files, it always stopped with the following exception. Setting the right locale helps tar to use the right file name conversion.

Backing up : /btsync
writing meta data to file
/data/btsync /var/lib/docker/vfs/dir/7af30504189f3af01e5e414a0d397f6f012a0db584b5b1b40cef54a047bf44a1
Traceback (most recent call last):
File "/backup.py", line 63, in
tar.add(volumes[v],v)
File "/usr/lib/python2.7/tarfile.py", line 2002, in add
recursive, exclude, filter)
File "/usr/lib/python2.7/tarfile.py", line 2002, in add
recursive, exclude, filter)
File "/usr/lib/python2.7/tarfile.py", line 2002, in add
recursive, exclude, filter)
File "/usr/lib/python2.7/tarfile.py", line 2002, in add
recursive, exclude, filter)
File "/usr/lib/python2.7/tarfile.py", line 2002, in add
recursive, exclude, filter)
File "/usr/lib/python2.7/tarfile.py", line 2001, in add
self.add(os.path.join(name, f), os.path.join(arcname, f),
File "/usr/lib/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)