[Borgbackup] 'borg create' fails with whitespaces in directory names [OS X]

Adrian Klaver adrian.klaver at aklaver.com
Thu Mar 30 11:16:46 EDT 2017


On 03/29/2017 10:57 PM, David Martin wrote:
> Good day,
> 
> I'm trying a first-time setup of borg and it chokes on whitespaces in my
> directories. A minimal example:
> 
>> BORG_PASSPHRASE="$PASS" borg create --dry-run -v --stats \
>>   $REPOSITORY::'{hostname}-{now:%Y-%m-%d}'    \
>  >  'Users/davidm/Dev/test_repo/test dir'
> 
> I'm getting the following error:
>> Users/davidm/Dev/test_repo/test dir: [Errno 2] No such file or directory: 'Users/davidm/Dev/test_repo/test dir'
> 
> Trying to escape the whitespace does not help. For example with 'test\
> dir':
>> Users/davidm/Dev/test_repo/test\ dir: [Errno 2] No such file or directory: 'Users/davidm/Dev/test_repo/test\\ dir'

Not sure it is the whitespace:

aklaver at tito:~> borg_new  create --dry-run -v --stats borg_test::test_run 'home/aklaver/test space/'
home/aklaver/test space: [Errno 2] No such file or directory: 'home/aklaver/test space'

aklaver at tito:~> borg_new  create --dry-run -v --stats borg_test::test_run '/home/aklaver/test space/'

> 
> My setup:
> OSX 10.11.6
> borg 1.0.10 installed from homebrew
> 
>> $ brew cask info borgbackup
>> borgbackup: 1.0.10
>> /opt/homebrew-cask/Caskroom/borgbackup/1.0.10 (5.4MB)
>> From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/borgbackup.rb
> 
>> $ python3 --version
>> Python 3.6.1
>> $ bash --version
>> GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin15.6.0)
> 
> Am I missing something or not escaping whitespaces correctly?
> Otherwise I'm fairly familiar with Python and I would be happy to have a
> closer look. Is there a simple way to run for example 'borg create' from
> the sources?
> 
> Thanks and regards,
> 
> David
> _______________________________________________
> Borgbackup mailing list
> Borgbackup at python.org
> https://mail.python.org/mailman/listinfo/borgbackup
> 


-- 
Adrian Klaver
adrian.klaver at aklaver.com


More information about the Borgbackup mailing list