머신러닝과 기술적 분석

AWS EC2 instance의 file을 local computer 에 다운로드 받는 방법 본문

카테고리 없음

AWS EC2 instance의 file을 local computer 에 다운로드 받는 방법

BetterToday 2017. 9. 10. 05:50
728x90

AWS EC2에서 작업한 내용을 로컬 computer 에 직접 다운로드 받아야 할 경우가 있다. 예를 들어 AWS EC2 에서 training 한 file은 github에 올리기가 어렵기 때문에 직접 다운로드 받아야 한다.


이럴때는 로컬 컴퓨터의 console 창에서 scp command를 이용해서 aws instance에서의 작업한 내용을 로컬 computer 에 다운로드 받을 수 있다.

scp ($instance)@xx.xxx.xx.xxx:($filename) .
  • ($instance) : AWS instance name
  • ($filename) : AWS instance 에서의 full path filename
  • xx.xxx.xx.xxx : AWS의 ip address

예를 들어 ip 주소가 11.111.11.111gpu라는 instance에서 weights/weights.hdf5 file을 로컬의 같은 파일로 복사하는 명령은 다음과 같다.

c:\>scp gpu@11.111.11.111:weights/weights.hdf5 .

이렇게 하면 c:\weights\weights.hdf5 로 복사된다.

728x90
반응형
Comments