View Single Post
  #4   (View Single Post)  
Old 11th February 2010
FBSD FBSD is offline
Real Name: Joe Barbish
KING
 
Join Date: Feb 2010
Location: Angeles City, Philippines
Posts: 19
Default

When accessing one of the FreeBSD FTP services it is very common to get timed out before downloading of all the files is completed. Re-running the above shown .netrc will just start downloading from the beginning again.
The use of the mget command is what causes this. Changing mget to mreget will cause FTP to check the local host for the file and only download it if it's missing from the local host or it's date or size is different. This way you can use the same .netrc for the first execution and or to restart downloading files where your task was forced to end because the remote host timed you out.

I issue this command on the user root console command line for the first execution and all restarts.

ftp -v ftp2.jp.FreeBSD.org

This is the corrected .netrc file I have in /root directory

Code:
machine ftp2.jp.FreeBSD.org
login anonymous
password FBSD@home.com
macdef init
prompt off
cd /pub/FreeBSD/releases/i386/8.0-RELEASE
epsv4 off
mreget  ERRATA.HTM ERRATA.TXT HARDWARE.HTM HARDWARE.TXT README.HTM
mreget  README.TXT RELNOTES.HTM RELNOTES.TXT cdrom.inf docbook.css
$ getdir base catpages dict doc games info kernels manpages ports proflibs src
quit

macdef getdir
! mkdir $i
mreget $i/*
There are two things you may notice.
The use of the “epsv4 off” statement. FTP defaults to using extended passive mode. I could not get FTP to function through my ipfilter firewall until I forced FTP to use native passive mode by adding the "epsv4 off" which turns off extended passive mode.
Secondly I am using the mirror ftp2.jp.FreeBSD.org site. I tried a few other mirror FTP sites and was timeout after 3 to 5 minutes. This mirror has very little traffic and I got 80% done before timing out. Only one restart was necessary to complete the download. Recommend you try different mirrors located near your geographical location until you find one with low traffic.

Last edited by J65nko; 11th February 2010 at 09:04 PM. Reason: Added [code] and [/code] tags to .netrc file
Reply With Quote