duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] Scp calls


From: Tim Riemenschneider
Subject: Re: [Duplicity-talk] Scp calls
Date: Tue, 05 Jan 2010 15:53:47 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

AJ Weber schrieb:
> Yes, re-directing the scp to be a script + scp would probably work. 
> Would not be elegant, but would probably work.
>
> I'm not sure about the "wrapper script".  I'm not familiar with that. 
> I know you can pass custom ssh params, but have not seen how that
> actually runs the params (maybe that's not what you're talking about
> at all).  But it would have to be a bit of a hack like "knock server
> && scp server..."
duplicity has the options:

*--scp-command */command/
    This option only matters when using the ssh/scp backend. The
    /command/ will be used instead of scp to send or receive files. The
    default is "scp". To list and delete existing files, the sftp
    command is used. See *--ssh-options* and *--sftp-command*.

*--sftp-command */command/
    This option only matters when using the ssh/scp backend. The
    /command/ will be used instead of sftp for listing and deleting
    files. The default is "sftp". File transfers are done using the scp
    command. See *--ssh-options* and *--scp-command*. 

so a hackish wrapper would be:

------------------
#!/bin/bash

/path/to/knock --param foo --bar --baz #whatever is needed....

# path to real scp
/usr/bin/scp "$@"
-----------------

this runs a knock-program (use whatever parameters are necessary). Then
scp is called with all options the wrapper is called with.
This means that all parameters to the knock-program are hardcoded in the
wrapper-script.
A better approach would parse the parameters to find the server that
should be knocked, but that is left as exercise for the reader ;-)

cu
Tim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]