Posted in Linux/Unix/BSD -
I very occasionally need to support people with websites on servers other than those I manage. If the server is only accessible using FTP and I need to get a copy of the entire website, then I use the ncftpget command line tool to recursively download all the files and directories in one go.
ncftpget is part of the ncftp package.
On APT based Linux distros (e.g. Debian) you can install it like this:
apt-get install ncftp
On YUM based Linux distros (e.g. CentOS, RHEL) you can install it like this:
yum install ncftp
Use the command like so:
ncftpget -R -T -v -u [username] [hostname] [local path] [remote path]
-R tells ncftpget to download files and directories recursively
-T says not to try a tar download (it's never worked for me and results in the error "tar: This does not look like a tar archive" and "tar: Exiting with failure status due to previous errors". The actual files subsequently download just fine).
-v says to be verbose and show the download progress; you can omit this but it can be useful to see what's going on
-u specifies the username to use. Change [username] to the user to log in as
Replace [hostname] with the server to ftp to.
Replace [local path] to where you want to copy the files to.
Replace [remote path] to the path where the files are on the server you are connecting to.
Let's say our username is "chris", the server is 10.1.1.10, the path we want to save to locally is /tmp and we want to download files from the remote host from /httpdocs. Do this:
ncftpget -R -T -v -u chris 10.1.1.10 /tmp /httpdocs
You are then prompted for the password and the download starts.
제목 | 날짜 | ||
---|---|---|---|
539 | [리눅스서버] 계정등록(adduser) 기능 및 옵션, 계정 변경(usermod) | 325 | 2017/10/28 |
538 | [유틸리티] [FreeCommander] 컬러 스키마 변경 | 327 | 2020/01/12 |
537 | HTML/CSS 스크롤바 숨기기 없애기 (스크롤 동작) | 328 | 2021/09/01 |
536 | [사이트관리] SEO 작업 | 328 | 2017/12/04 |
535 | [Nginx] [Nginx+Rewriterule] apache / nginx 에서 .php 생략하기 | 330 | 2017/05/30 |
534 | [브라우저] 유투브 공유하기 자동재생 설정(웨일, 크롬) | 332 | 2019/04/06 |
533 | [웹 제작] 검색 엔진과 매개변수 | 348 | 2015/08/25 |
532 | [윈도우서버] 오토셋 아파치 에러로그 확인하기 | 350 | 2020/02/14 |
531 | [Apm] autoset 500 Internal Server Error | 357 | 2018/12/04 |
530 | [사이트관리] 사이트 실시간 접속자 체크 스크립트 | 360 | 2017/04/19 |
529 | [PHP] phpmyadmin 서버 에러가 감지되었습니다. [1] | 372 | 2020/04/06 |
528 | [Nginx] Nginx 모니터링 툴 | 400 | 2017/10/23 |