Article 55K15 Alternative address for download locations

Alternative address for download locations

by
orangepeel190
from LinuxQuestions.org on (#55K15)
Hi All,

I just want to check that I have this correct....

Say Server 1 is where I primarily download a file from.
Server 2 is a backup location
Server 3 is the final location

If server 1 fails is down, the script will try server 2, server 3 until its either downloaded the file or runs out of address.

Would it be written as (back script) using curl....

/usr/bin/curl -sSkLO http://server1/file || \
/usr/bin/curl -sSkLO http://server2/file || \
/usr/bin/curl -sSkLO http://server3/file || error 1

Does that seem correct? Keeps working through the list of servers to obtain the file incase the higher servers are down or that particular file is not available/present?

Thankslatest?d=yIl2AUoC8zA latest?i=gtZW7qaOw0U:HOm6Iu2S9lk:F7zBnMy latest?i=gtZW7qaOw0U:HOm6Iu2S9lk:V_sGLiP latest?d=qj6IDK7rITs latest?i=gtZW7qaOw0U:HOm6Iu2S9lk:gIN9vFwgtZW7qaOw0U
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments