|
From: | Yves Goergen |
Subject: | [Duplicity-talk] SSH backend and shell escaping |
Date: | Tue, 09 Dec 2014 22:03:25 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
SFTP_HOST=xxxx.de SFTP_USER=xxxx SFTP_KEYFILE=/root/.ssh/id_backup BACKUP_NAME=test KEY_ID=ABCDEF12 COMMON_ARGS="--archive-dir /backup --ssh-options=\"-oIdentityFile=$SFTP_KEYFILE\"" COMMON_BACKUP_ARGS="$COMMON_ARGS --name $BACKUP_NAME --encrypt-sign-key $KEY_ID" SOURCE=/tmp DEST=sftp://address@hidden/backup-$BACKUP_NAME export PASSPHRASE= duplicity $COMMON_BACKUP_ARGS $FULL_EVERY_DAYS "$SOURCE" "$DEST"
The result is this:BackendException: ssh connection to address@hidden:22 failed: [Errno 2] No such file or directory: '/root/.ssh/id_backup"'
Note the extra " at the end of the SSH key file name. It's not supposed to be there. Is duplicity not parsing shell arguments right? If I specify the --ssh-options argument directly with the duplicity call, not inside a variable, it works fine. So my setup is basically correct. This change where I want that parameter for all different duplicity calls just can't be parsed.
I know that in this case I might just leave out the nested quotes. But as soon as I need a second SSH option, it's mandatory.
My shell is bash on Ubuntu 14.04. Duplicity 0.6.23. -- Yves Goergen http://unclassified.de http://dev.unclassified.de
[Prev in Thread] | Current Thread | [Next in Thread] |