0

I have tried code entered into the putty command line such as rsync -avz myHugeFile.dat amazonusername@my.amazon.host.ip:

Trouble Uploading Large Files to RStudio using Louis Aslett's AMI on EC2 (code taken from the linked question above)

Though I could not get it to work and I think this was due to not knowing how to properly frame it in light of the location of the files. I am putting this as a separate question rather than a comment as I don't have enough 'reputation' to comment. in the context of a windows user asking this 1) Was I correct to use this in Putty? 2) Did I need to put anything before it? 3) the only things editable are the address of the EC2 so I have that correct and the location of the file. If the file is on the desktop, how would I write this?
Even if you can only answer one of these basic questions it would be really helpful as I piece together code on how to do this. If this question is too basic for this site and your are going to remove, could you please give me an answer before doing so ;)

Community
  • 1
  • 1
Joey
  • 137
  • 2
  • 13
  • if you are using windows, use a tool like winscp to upload files to your ec2. putty command will be executed on the ec2 itself and will not find your local file. Also you have to take care to open the security group of your ec2 to allow network traffic with your computer. – Tom Jan 21 '16 at 11:25
  • Hi Tom, thank you for taking the time to comment on my post. If I understand correctly running this line will not work in Putty as Putty has the EC2 as its computer. The other question I quoted recommends to use this code on "your local PC command line". I am assuming this is Putty? see http://stackoverflow.com/questions/24891861/trouble-uploading-large-files-to-rstudio-using-louis-asletts-ami-on-ec2 – Joey Jan 21 '16 at 23:00
  • Also to whoever downvoted my question, if you have a comment as to how it can be improved, please share. I am happy for constructive feedback. The question may not be of interest to you, but these command line queries are really holding up my programming in R and it would be great to have a solution :) – Joey Jan 21 '16 at 23:04
  • I am more a Linux guy than windows, in Linux you can run the rsync command directly on your computer. In windows this is a bit different and rsync doesn't work, but you could use a similat Powershell commands. however, winscp is a software designed to upload/download files to a server (here your ec2 instance) from your local windows computer. It 's free and pretty simple to use. If that 's fine for you I recommend to use it instead of rsync with putty. Putty is more intended to ssh your ec2 instance. – Tom Jan 21 '16 at 23:21
  • Thanks Tom, I appreciate that you have taken the time to help here (seriously, I REALLY do appreciate this). So previously I did as you suggested. I tried both winscp and filezilla to connect. Both were successful to some extent. With both I could connect, but not upload files (except to a temporary folder, that I could not see how to access from within EC2). I ran some code (sudo chown -R ubuntu /home/rstudio & sudo chmod -R 755 /home/rstudio) and voila, I could now upload files. But when I went back I could now longer access Rstudio from my instance, it just hung and I could not log in. – Joey Jan 22 '16 at 02:13
  • So I also think you have answered my question – Joey Jan 22 '16 at 02:14
  • So I also think you have answered my question - "you can't upload files with putty like this to an Rstudio instance, better to try and work out the command lines to be able to get privileges to upload files" I had put this as a separate question http://stackoverflow.com/questions/34918028/aws-ec2-rstudio-server-error-occured-during-transmission I have been at this since November, and spent days on it which might make me a bit dumb. But it was time to ask for help so asked the questions yesterday. I also tried other codelines, but always that issue :( – Joey Jan 22 '16 at 02:25
  • Happy to help :) I will put my comment as answer if this answers your question. – Tom Jan 22 '16 at 07:21

1 Answers1

1

to sum up what we said in comments: don't use putty to upload files, it is more intended to ssh to your instances. Use a software like winscp or filezilla instead, which are free and easy to use, you will find it a lot easier

Tom
  • 2,689
  • 16
  • 21
  • Thank you Tom, really appreciate you taking the time to answer this. For anyone reading this in future. I am not saying that there is no way to do this, it is just any code that I tried (from searching this and other sites) to upload files via putty did not work and Tom had provided an explanation and an alternative suggestion that works. http://stackoverflow.com/questions/34918028/aws-ec2-rstudio-server-error-occured-during-transmission/34941256?noredirect=1#comment57619681_34941256 For that reason I am marking this as answered. And Thank you Tom :) – Joey Jan 22 '16 at 10:15
  • Just to update for a future reader, unfortunately files were successfully moved to EC2 this way via a round about route through the tmp folder and I have tried this a number of times via different files and different instances now, but every file was corrupted on arrival and I could not open them. I seriously wonder if AWS does not want people to use other methods than S3. It would be so easy if the upload button in rstudio just worked for reasonably sized files :( – Joey Feb 01 '16 at 02:40