Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

명령행에서 AWS, Azure 등의 원격 저장소에 파일 관리하는 방법 - cyberduck/duck 소개

회사 동료를 통해 cyberduck이라는 제품을 알게 되었습니다. ^^

cyberduck
; https://cyberduck.io/

위의 링크 글에서도 나오지만 "FTP, SFTP, WebDAV, Amazon S3, OpenStack Swift, Backblaze B2, Microsoft Azure & OneDrive, Google Drive and Dropbox."에 대한 파일 관리를 해주는 통합 도구인데요, 아쉽게도 cyberduck이 명령행을 지원하지 않습니다.

대신 별도로 duck이라는 도구로 제공하는데요, 윈도우의 경우 패키지 관리자로써 새롭게 떠오르고 있는 chocolatey을,

The package manager for Windows
Chocolatey - Software Management Automation
; https://chocolatey.org/
; https://chocolatey.org/install

설치한 다음,

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

간단하게 duck 도구를 내려받을 수 있습니다.

choco install duck




사용법은 스토리지 별로 달라지는데,

Cyberduck Help / Howto / Command Line Interface (CLI)
; https://trac.cyberduck.io/wiki/help/en/howto/cli

위의 문서에 따라, 예를 들어 아마존이라면 스토리지에 대한 "Access key ID"를 구해 다음과 같이 실행하면 파일 업로드가 됩니다.

[형식]
duck --username "...[access key id]..." --upload s3:...[server path]... ...[client path]... --existing overwrite

[사용 예]
Access key ID: FAICA5IZ72CDKSLNM96DQ
서버 측 경로: /test-stg/my
클라이언트 측 업로드할 파일 경로: c:\temp\test.zip

duck --username "FAICA5IZ72CDKSLNM96DQ" --upload s3:/test-stg/my/test.zip c:\temp\test.zip --existing overwrite
[사용 예 - 목록]
duck --username "FAICA5IZ72CDKSLNM96DQ" --list s3:/test-stg/my

[사용 예 - 삭제]
duck --username "FAICA5IZ72CDKSLNM96DQ" -D s3:/test-stg/my/test.zip




참고로, Chocolatey에서 cyberduck 제품도 설치할 수 있습니다.

Cyberduck (Install)
; https://chocolatey.org/packages/cyberduck.install

choco install cyberduck.install 




[2020-06-23 내용 추가]

만약 다음과 같은 오류가 발생한다면?

C:\> duck --username "..." --password "..." --list s3://mycontainer/mystore
Resolving mycontainer
Connection failed. DNS lookup for mycontainer failed. DNS is the network service that translates a server name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing access to the network.


그것은... ^^ s3의 주소를 "s3://"와 같은 식으로 했기 때문입니다. "s3:/"로 슬래시 문자를 하나만 넣어야 합니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 10/28/2020]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 151  152  153  154  155  156  157  158  159  160  161  162  163  164  [165]  ...
NoWriterDateCnt.TitleFile(s)
917정성태8/26/201021806개발 환경 구성: 86. "Routing and Remote Access"의 "Routing" 기능 활성화 방법
916정성태8/25/201021120개발 환경 구성: 85. 가상 네트워크에 LAN 어댑터 보이거나 감추는 방법
915정성태8/24/201039261개발 환경 구성: 84. Hyper-V의 네트워크 유형 (2)
913정성태8/22/201028346오류 유형: 104. Hyper-V 관리자 - VM 생성 오류 (VHD 생성 오류)
912정성태8/20/201030259.NET Framework: 183. 구조체 포인터 인자에 대한 P/Invoke 정의파일 다운로드1
911정성태8/19/201027128오류 유형: 103. System.Reflection.TargetException파일 다운로드1
910정성태8/19/201037941개발 환경 구성: 83. Hyper-V의 네트워크 유형 (1)
909정성태8/18/201033334오류 유형: 102. System.MissingMethodException
908정성태8/17/201024336개발 환경 구성: 82. Windows Virtual PC의 네트워크 유형 (3)
907정성태8/14/201021850개발 환경 구성: 81. Windows Virtual PC의 네트워크 유형 (2)
906정성태8/13/201030757개발 환경 구성: 80. Windows Virtual PC의 네트워크 유형 (1)
905정성태8/8/201032914Team Foundation Server: 39. 배치 파일로 팀 빌드 구성 [2]파일 다운로드1
904정성태8/8/201035672오류 유형: 101. SignTool Error: No certificates were found that met all the given criteria. [2]
903정성태8/6/201032532Team Foundation Server: 38. TFS 소스 코드 관리 기능 (4) - Branch
902정성태8/5/201024878Team Foundation Server: 37. TFS 2010의 소스 서버 수작업 구성
901정성태8/4/201024169Team Foundation Server: 36. TFS 소스 코드 관리 기능 (3) - Label
900정성태8/3/201026796Team Foundation Server: 35. TFS 소스 코드 관리 기능 (2) - Shelveset
899정성태8/2/201028866Team Foundation Server: 34. TFS 소스 코드 관리 기능 (1) - Changeset
898정성태7/31/201028400.NET Framework: 182. WCF의 InactivityTimeout [1]파일 다운로드1
897정성태7/26/201129627.NET Framework: 181. AssemblyVersion, AssemblyFileVersion, AssemblyInformationalVersion [4]
896정성태7/25/201036387.NET Framework: 180. C# Singleton 인스턴스 생성 [2]
895정성태7/25/201020265VS.NET IDE: 68. Visual Studio 2010 - .NET 1.1 원격 디버깅
894정성태7/25/201026183오류 유형: 100. Could not find the Database Engine startup handle. [1]
893정성태7/25/201027296오류 유형: 99. .NET 4.0 설치된 윈도우 7에서 SQL Server 2008 R2 설치 오류
892정성태7/9/201029072오류 유형: 98. 영문 윈도우에 한글 SQL Server 2008 R2 설치할 때 오류 [4]
891정성태7/8/201024903오류 유형: 97. MsiGetProductInfo failed to retrieve ProductVersion for package with Product Code = '{...}'. Error code: 1605. [2]
... 151  152  153  154  155  156  157  158  159  160  161  162  163  164  [165]  ...