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

비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  8  9  10  11  12  [13]  14  15  ...
NoWriterDateCnt.TitleFile(s)
13298정성태3/27/20233682Windows: 236. Win32 - MessageBeep 소리가 안 들린다면?
13297정성태3/26/20234358Windows: 235. Win32 - Code Modal과 UI Modal
13296정성태3/25/20233695Windows: 234. IsDialogMessage와 협업하는 WM_GETDLGCODE Win32 메시지 [1]파일 다운로드1
13295정성태3/24/20233963Windows: 233. Win32 - modeless 대화창을 modal처럼 동작하게 만드는 방법파일 다운로드1
13294정성태3/22/20234138.NET Framework: 2105. LargeAddressAware 옵션이 적용된 닷넷 32비트 프로세스의 가용 메모리 - 두 번째
13293정성태3/22/20234205오류 유형: 853. dumpbin - warning LNK4048: Invalid format file; ignored
13292정성태3/21/20234330Windows: 232. C/C++ - 일반 창에도 사용 가능한 IsDialogMessage파일 다운로드1
13291정성태3/20/20234742.NET Framework: 2104. C# Windows Forms - WndProc 재정의와 IMessageFilter 사용 시의 차이점
13290정성태3/19/20234249.NET Framework: 2103. C# - 윈도우에서 기본 제공하는 FindText 대화창 사용법파일 다운로드1
13289정성태3/18/20233439Windows: 231. Win32 - 대화창 템플릿의 2진 리소스를 읽어들여 자식 윈도우를 생성하는 방법파일 다운로드1
13288정성태3/17/20233553Windows: 230. Win32 - 대화창의 DLU 단위를 pixel로 변경하는 방법파일 다운로드1
13287정성태3/16/20233709Windows: 229. Win32 - 대화창 템플릿의 2진 리소스를 읽어들여 윈도우를 직접 띄우는 방법파일 다운로드1
13286정성태3/15/20234166Windows: 228. Win32 - 리소스에 포함된 대화창 Template의 2진 코드 해석 방법
13285정성태3/14/20233757Windows: 227. Win32 C/C++ - Dialog Procedure를 재정의하는 방법파일 다운로드1
13284정성태3/13/20233955Windows: 226. Win32 C/C++ - Dialog에서 값을 반환하는 방법파일 다운로드1
13283정성태3/12/20233497오류 유형: 852. 파이썬 - TypeError: coercing to Unicode: need string or buffer, NoneType found
13282정성태3/12/20233822Linux: 58. WSL - nohup 옵션이 필요한 경우
13281정성태3/12/20233733Windows: 225. 윈도우 바탕화면의 아이콘들이 넓게 퍼지는 경우 [2]
13280정성태3/9/20234495개발 환경 구성: 670. WSL 2에서 호스팅 중인 TCP 서버를 외부에서 접근하는 방법
13279정성태3/9/20234048오류 유형: 851. 파이썬 ModuleNotFoundError: No module named '_cffi_backend'
13278정성태3/8/20234019개발 환경 구성: 669. WSL 2의 (init이 아닌) systemd 지원 [1]
13277정성태3/6/20234661개발 환경 구성: 668. 코드 사인용 인증서 신청 및 적용 방법(예: Digicert)
13276정성태3/5/20234338.NET Framework: 2102. C# 11 - ref struct/ref field를 위해 새롭게 도입된 scoped 예약어
13275정성태3/3/20234693.NET Framework: 2101. C# 11의 ref 필드 설명
13274정성태3/2/20234277.NET Framework: 2100. C# - ref 필드로 ref struct 타입을 허용하지 않는 이유
13273정성태2/28/20233973.NET Framework: 2099. C# - 관리 포인터로서의 ref 예약어 의미
1  2  3  4  5  6  7  8  9  10  11  12  [13]  14  15  ...