How do I access data from my personal computer on my AMI instance running RStudio server [closed] - r

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have recently set up RStudio on an AMI ec2 instance using the process generously laid out by Louis Aslet from his website. But in an embarrassing turn of events I can't access the data I need because it resides on my personal computer. I am new to cloud computing and have 0 functional knowledge of Linux, but I do know SQL, and R well. Any help or suggestions would be greatly appreciated.

Have you tried the "Upload" button in the "Files" window of Rstudio?

use scp in terminal.
To put files from your remote server
Example: if the files are located locally in ~/mylocalfolder and you want to put them in /home/rstudio/mydata you would execute in terminal:
scp ~/mylocalfolder/*.csv ubuntu#<your address>:/home/rstudio/myData/
Note that if you want to access them under a different user, eg, rstudio, you need to change owners on the files. Use chown
To grab data from your remote server
Example: if the files are located on /home/rstudio/mydata and you want to put them locally in ~/mylocalfolder you would use
scp ubuntu#<your address>:/home/rstudio/myData*.Rda ~/mylocalfolder

I use the RStudio AMI all the time and what works for me is to use Dropbox. I can't remember exactly how I did it but I think I may have started the shell from within RStudio and installed Dropbox from the command line.
This link has a little more info:
http://www.louisaslett.com/RStudio_AMI/#comment-1041983219

Related

How to make sure that a process on Gunicorn3 runs continuously? [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 months ago.
Improve this question
I have a flask app deployed on a Ubuntu server. I use Nginx, and Gunicorn3. I know from this StackOverflow post that one of the correct ways to have the app running continuously on the server is to use something like:
gunicorn3 app:application --workers 3 --bind=127.0.0.1:1001 --daemon
But to be completely safe, since there are many other processes running on that server, I would like to find a way to check whether this process IS indeed running, and if it is NOT running (for whatever reasons) then to start it again.
In addition to that question, to make the app working at reboot, I use the following cronjob:
#reboot bash ~/restart_processes.sh
Where the .sh file executes the command line given above for starting Gunicorn3. Is this good practice or is there a better way to achieve the same result?
Thank you!
Kind regards,
I always use to deploy it in production with supervisorctl + nginx. Check this tutorial . You can simply start, restart or stop with a command.

Publish r shiny application in intranet [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am trying to build a Rstudio/Shiny App and post it in our intranet so that everyone else in our office could see it. I am a windows person, and the instructions online about how to setup a shiny server within Linux environment is a bit difficult for me. Is there an easy way that I can could accomplish this goal without messing up with Linux. Even if I have to do so, is there an easy way to just have my webpage available to people within our company, not everyone on the internet. Thanks!
You can use shinyapps.io and add a password authentication by using, for example, shinymanager Link here.
If you have a computer that's always on, you can run R on it and run the command shiny::runApp(host="0.0.0.0", port="xxxx")". You can experiment a bit with the port in xxxx.
You will have to know the computer's ip-address. You can then direct your colleagues to http://<ip-address>:<xxxx>, where you replace <ip-address> and <xxxx> with the respective ip-address and port. You might have to unblock the port in Windows Firewall.
If you do not have a computer available that is always turned on, you can actually install R onto a network drive, install required packages on the network drive, and then have users run R from the network drive and run the app themeselves.

AWS EC2 Rstudio Server Error Occured During Transmission [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
After over a month, I have managed to piece together how to setup an AWS EC2 server. It has been very hard to upload files as there are very conservative (size) limits when done via the upload button in Rstudio Server. The error message when this is attempted is "Unexpected empty response from server".
I am not unique in this respect e.g. Trouble Uploading Large Files to RStudio using Louis Aslett's AMI on EC2
I have managed to use the following commands through putty and this has allowed me to upload files via either filezilla or winscp.
sudo chown -R ubuntu /home/rstudio
sudo chmod -R 755 /home/rstudio
Once I use these commands and log out, I can no longer access rstudio on the instances in future logins. I can relogin to my instances via my browser, but I get the error message:
Error Occurred During Transmission
Everything is fine other than once I use Putty I lose browser access to my instances.
I think this is because the command is change of ownership or similar. Should I be using a different command?
If I don't use a command I cannot connect between filezilla/winscp and the instance.
If anyone is thinking of posting a comment that this should be closed as it is a hardware issue, I don't have a problem with hardware. I am interested in the correct coded commands.
Thank you :)
Ok so eventually I realised what was going on here. The default home directory size for AWS is less than 8-10GB regardless of the size of your instance. As this as trying to upload to home then there was not enough room. An experienced linux user would not have fallen into this trap, but hopefully any other windows users new to this who come across this problem will see this. If you upload into a different drive on the instance then this can be solved. As the Louis Aslett Rstudio AMI is based in this 8-10GB space then you will have to set your working directory outside this, the home directory. Not intuitively apparent from Rstudio server interface. Whilst this is an advanced forum and this is a rookie error I am hoping no one deletes this question as I spent months on this and I think someone else will too.
Don't change the rights of /home/rstudio unless you know what you are doing, this may cause unexpected issues (and it actually does cause issues in your case). Instead, copy the files with filezilla or winscp to a temporary file (let say /tmp), then ssh to your instance with putty and move the file to the rstudio directory with sudo (e.g sudo mv /tmp/myfile /home/rstudio).

Download files with specific date from SFTP server using PSFTP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
How can I download files of a specific time period through PSFTP?
When I do mget *.*, it downloads all the files into local folder. Now I’m not allowed to delete these files from SFTP server or move them. So every time I download, it has to download the complete list.
Is there a way where I can download only those files through mget which are a week old?
PSFTP does not support time-based file selection.
You can use scripting interface of WinSCP instead.
It supports time-constraints in file mask.
To download all week old (7 days old) files, use the following command:
get *<7D
See the guide for converting PSFTP script to WinSCP script.
For general introduction to WinSCP scripting see:
https://winscp.net/eng/docs/guide_automation
See also similar question WinSCP time based file download.
(I'm the author of WinSCP)

Shared folders options for vmware in ESXi server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am using ESXi server and run VMs using vSphere client. I was using shared folders options in VMware but I cannot find this option in these VMs now. How can I create a shared folder or how can I transfer files between VMware virtual machines easily? Thanks.
If you only need to transfer files from the host to the guest, the simplest solution is to create an ISO image and attach it to the virtual CD/DVD drive. For example, on Linux, the following command creates an ISO image foo.iso from the bar directory, preserving long file names (-J).
genisoimage -o foo.iso -J bar
If you need something more complex than that, ESXi has no such built-in method, it's best to set up a VM for such things with an (S)FTP, SMB or NFS service.

Resources