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?
Thanks


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?
Thanks