0

I'm trying to upload a .zip file to a location on a remote server.

In my fabfile.py I have this line:

local("rsync files.zip webfaction:~/webapps/app")

This completes without a problem. However when I ssh onto the box, I find that rsync put the files.zip file in

~/webapps/app/Users/kevin/resources/files.zip

Where I really just want to put it in webapps/app without copying the local file structure. What can I do to avoid having rsync copy over the local file structure along with the files?

Thanks, Kevin

Kevin Burke
  • 61,194
  • 76
  • 188
  • 305

2 Answers2

0

rysnc does not copy the local folder structure if it is not included in your command (don't think it will even if you specify it).

Are you sure you got the command correct? If so, I guess it could be something to do with how Python locates the file through the local() method.

Not much help, but I hope it'll provide some clue...

cheeze
  • 427
  • 5
  • 16
0

Since you're using Fabric, why aren't you using the put() api call?

Morgan
  • 4,143
  • 27
  • 35