Forums

RSync

It seems that rsync is not installed on the server, am I missing something? Is it possible to have this installed? Do you have another suggestion for deploying from a development machine to the python anywhere server?

There's always the venerable scp, which typically supports a -r option to recurse into directories. However, I do agree that rsync would be a useful addition.

I've upvoted adding rsync on our to-do list. scp will definitely work for now, or you can use the in-browser file page to upload a zip or Dropbox.

+1

+1

Thanks! I've noted those.

rsync should definitely be installed and I'm amazed it's not

yes, put it on top of that todo list! It would reduce allot of unnecessary traffic since we can then check only for updated files. So a big +1 on rsync!

scp is fine for simple jobs, but plainly using the -r option is not enough, because it offers no way to filter the files uploaded. We really need rsync, c'mon guys, it's a win-win situation, you save bandwidth, we save time.

Yup, we hear ya. There is no reason for us not to include it on the execution servers. But we just have a backlog of new features that we are trying to get out at the moment. Each addition needs to go through our testing loop before we release it.

Any estimations when we could see it ?

None as yet. We're working on a couple of big scalability enhancements (much needed as we've just hit the limit on how many people we can support on the current platform, which is making things unreliable) and that's made it hard to add new functions like this in the short term. However, it's on the list and should be easy once we've sorted out the platform. I've added +1s to the ticket for everyone who's commented on this thread.

well please add one more + then ;) SCP is really a hassle and has allot of unnecessary transfers

Ah, you only get one +1 per person :-)

But noted. We'll get to it...

+1 from me too. Without a fast, reliable and automatable file sync then pythonanywhere platform (which I think is otherwise very cool) is much less valuable to me as either a development environment from which I can do backups, or as a production environment to which I can deploy.

Harry's working on getting it installed right now -- it'll be in our next release.

Awesome.

+1 from me. We need it.

Hey guys, rsync should be installed and ready to use already! To send a file or directories from your local machine to your pythonanywhere console, run the following code from your local machine:

rsync -avzhe ssh <LOCAL_FILE_PATH> <USER_NAME>@ssh.pythonanywhere.com:<DESTINATION_DIRECTORY>

Similarly, to grab a file (or directories) from your pythonanywhere account to your local machine, run the following from your local machine:

rsync -avzhe ssh <USER_NAME>@ssh.pythonanywhere.com:<PYTHONANYWHERE_FILE_PATH> <LOCAL_DIRECTORY>

If you have a local server/another server somewhere, you could also rsync between them. Let me know if you guys have any problems with this. Keep in mind that a free account would have restricted external internet access.

Conrad

Hi Conrad, in premium account can I use rsync by login in console here (PA) then send the directory to my another server (with specific port like 2220)? Is it possible?

Hi kus,

That is possible. You just need to configure your own server to listen on say 2220 or whatever port for an incoming ssh connection first of course. To transfer a whole file directory recursively, the rsync code should look something like this from your pythonanywhere console:

rsync -ravzhe 'ssh -p 2220' <DIR_PATH_ON_PYTHONANYWHERE> <USER_NAME>@<YOUR_SERVER>:<DESTINATION_PATH>

While PythonAnywhere only accepts incoming ssh connections at port 22, this should not matter in your case.

Conrad

Thanks Conrad. It works now!

Thanks for confirming!