duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Scp calls


From: AJ Weber
Subject: Re: [Duplicity-talk] Scp calls
Date: Tue, 5 Jan 2010 14:52:09 -0500

Agreed.  This is a way to hack it up without diving into the source code.

Slightly more elegant would be to figure out when the last time you "knocked" was (maybe touch a file and check the date/time on each run), and not re-execute the knock unless the time had expired (or nearly so).

Thanks for the feedback.
-AJ

----- Original Message ----- From: "Tim Riemenschneider" <address@hidden>
To: "Discussion of the backup program duplicity" <address@hidden>
Sent: Tuesday, January 05, 2010 9:53 AM
Subject: Re: [Duplicity-talk] Scp calls


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


_______________________________________________
Duplicity-talk mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/duplicity-talk






reply via email to

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