fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Uploading a directory recursively?


From: Jeff Forcier
Subject: Re: [Fab-user] Uploading a directory recursively?
Date: Wed, 29 Jul 2009 20:43:17 -0400

Unfortunately, this is a limitation of Paramiko; its SFTP module is
only capable of handling one file at a time.

If you look in fabric.contrib.project there's an upload_project
function which gets around this by tarring up the directory, sftp'ing
that, then untarring it again. From your perspective it's just what
you ask for, you give it a local directory and remote location and it
does the job.

The function isn't terrifically flexible (it's largely untouched from
Fabric 0.1.x) but it should hopefully suffice, and obviously we're
happy to fix bugs in it when they come up.

Best,
Jeff

On Wed, Jul 29, 2009 at 7:02 PM, Erik Wickstrom<address@hidden> wrote:
> I'm trying to upload a directory recursively to my server with the put
> operation, however I get this traceback:
>
> put: linking -> /root/linking
>
> Fatal error: put() encountered an exception while uploading 'linking'
>
> Underlying exception message:
>    Is a directory
>
> Aborting.
>
> I've read through the docs and searched previous posts and haven't
> found anything regarding this.  How can I recursively upload a
> directory with Fabric (equivalent of scp -r)?
>
> Thanks!
> Erik
>
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/fab-user
>




reply via email to

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