Thanks Hrvoje,

Yes, --backups does seem to be what I want.

However, when I run the following command-line:

wget -m --backups -A gif,jpg,js,inc,css -o wget.log
ftp://userid:[EMAIL PROTECTED]/dir1/dir2

It returns:

wget: backups: Invalid specification `-A'.

It seems like it's expecting something to come after
--backups because whatever I put after the --backups
switch, it complains:

wget: backups: Invalid specification `-o'.

or even:

wget: backups: Invalid specification `*.*'.

Is there more that should follow this switch?  Are
there other switches it's incompatible with?  Is there
'documentation' in terms of past discussions on this
option?

Thanks for your help,

Dan

--- Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Dan LeGate <[EMAIL PROTECTED]> writes:
> 
> > What I'm wanting to do is Mirror a site, but keep
> backups of any
> > local files that get replaced because newer
> versions are being
> > downloaded.
> 
> You might want to try the undocumented option
> `--backups', which does
> what you want, i.e. forces the use of numbered
> backups.
> 
> Hmm.  Why is that option undocumented?  It seems
> useful in this case,
> and, as far as I can tell, it works correctly.
> 
> > Upon reading the documentation again, I think I
> originally
> > misunderstood the file.1, file.2 renaming scheme.
> >
> > I *thought* what happened was if a newer file
> exists on the remote
> > server, the local copy would first be renamed to
> file.1 and the
> > newer copy would be downloaded in its place.
> 
> That's what happens when you use `--backups'. 
> Normally, the local
> copy is overwritten by the new copy.
> 
> > Instead, it looks like the newer copy gets pulled
> down as file.1 and
> > then file.2, if I'm reading the following from the
> documentation
> > correctly:
> 
> Umm, no.  -N turns off the numbered backups, which
> means that the file
> is either not downloaded or is overwritten,
> depending on whether the
> local file is older than the remote file or not.
> 
> >    "When running Wget without -N, -nc, or -r,
> > downloading the same
> >    file in the same directory will result in the
> > original copy of
> >    file being preserved and the second copy being
> > named file.1.  If
> >    that file is downloaded yet again, the third
> copy
> > will be named
> >    file.2, and so on."
> 
> "Without -N" is the key phrase.
> 
> > I was hoping for this to be the local copy being
> renamed and the
> > newer file taking its place.  Am I reading this
> right?
> 
> You're not, but `--backups' does seem to do what you
> want.  Let us
> know if it works for you.
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

Reply via email to