0

I'm calling wget 1.11.4 as follows

$ wget -nd -S -N --backups=4 -r --no-parent --reject="index.html*" -e robots=off <url>

to repeatedly download all files from a server. My problem is, existing files won't get a rolled backup. Or only up to 1 file. So in the end there exists only 2 files, myfile and myfile.1. There is never a myfile.2.

Why is that? I specifically told wget to make 4 backup files.

1

It is working for me. --backups is a new option, for example my RHEL6.5 machines do not have it (wget 1.12), and my local Fedora machine does have it (wget 1.14).

Have you tried a simple test without the other options? This is what works for me:

>mkdir test; cd test

>wget -q --backups=4 http://ddg.gg/
>ls
index.html

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2  index.html.3

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2  index.html.3  index.html.4

>wget -q --backups=4 http://ddg.gg/
>ls
index.html  index.html.1  index.html.2  index.html.3  index.html.4
  • yes, you're right. It's working with a different version of wget. Your simple case doesn't event work for wget 1.11.4. So it's probably a bug in wget. I'm trying to upgrade and report back. thx for the hint. – duedl0r Aug 6 '14 at 22:05
  • 1
    I installed wget 1.15 and it's working now. ;) – duedl0r Aug 7 '14 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.