← Back to team overview

duplicity-team team mailing list archive

Re: [Question #289684]: duplicity URL & variable parsing (webDAV) in shell-script

 

Question #289684 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/289684

Description changed to:
# I am not a seasoned Ubuntu admin/ Duplicity user, so please bear with
me if I am missing something obvious...

1. Many WebDAV-providers supply usernames as
"emailaddress@xxxxxxxxxxxx". Although this does not seem to be RFC-
compliant, users have to live with that anyway...

2. Many WebDAV backends ignore duplicity's FTP_PASSWORD environment
variable.

3. Duplicity works OK when I provide cleartext password from CLI, e.g.

    <duplicity /localdir
webdavs://'emailaddress@xxxxxxxxxxxx':cleartextpassword@xxxxxxxxxxxxxxxxxxxxxxx/remotedir>

4. However, I do not want to use my cleartext password in the command
line process so that other users might not spoof it from the process
list

5. Trying to use duplicity from a shell script (bash), without using the
cleartext password in the command, e.g.

    <PWVARIABLE='cleartextpassword'
    export $PWVARIABLE
    duplicity /localdir webdavs://'emailaddress@xxxxxxxxxxxx':$PWVARIABLE@xxxxxxxxxxxxxxxxxxxxxxx/remotedir>

I always run into parsing problems of the juxtaposed "@" symbol which,
together with the WebDAV URL, will be parsed into the variable name.
This does not seem to be relieved by exchanging "%40" for "@" as
duplicity (or bash?) do not seem to parse this in a useful manner.
Putting "$PWVARIABLE" into quotes does not work either, since this seems
to be parsed as plaintext and not as variable.

My aim is to run the script with cron for off-site backups.

Is there a workable syntax for this? Any help is greatly appreciated!

# Thanks & kudos for this great tool!

<<edit>>
This site's laudable privacy filter automatically changes any string 'aaa<at>bbbbb.ccc' into a generic 'e-mail address'. This will, however, mess up other URLs in posts as well.

Just for clarification: In my syntax example above, it shoud read
something like

<webdavs://'fullemailaddress':$PWVARIABLE<at>fullwebdavURL/remotedir>

Thanks!

-- 
You received this question notification because your team duplicity-team
is an answer contact for Duplicity.