• Blog
  • Get Help Now!
  • Customer Portal

BlueGecko Denmark

  • Why you need us
    • Why act now
    • Why are we unique
  • What we do
    • Products Supported 24/7
      • MySQL
      • Postgres
      • SQL Server
      • Open Source
      • OS & Storage
  • How we do it
    • Consulting
    • System Monitoring
    • Security
  • Support
    • Blog
      • Oracle
      • MySQL
      • News & Events
      • Oracle Applications
      • Amazon Web Services
      • Jeremiah Wilton’s Oradeblog
      • OurSQL Community Podcast
      • Remote DBA
    • Team viewer
    • Whitepapers
  • About Us
    • Philosophy
    • The Blue Gecko Teams
    • Employment Opportunities
    • Partners
    • News
    • Press
  • Contact Us

December 23, 2009 by cedwards

Metalink wget download script

Looking for a simpler way to download from the new Metalink?  Oracle has replaced the ftp site with http downloads using wget.  If you’re looking for a simple way to use wget without all of that cutting-and-pasting from the web site, you can use a simple script like this:

#!/bin/bash
# Program:  download.sh
# Description:  Download Oracle patches from Metalink<!--more-->

PROGRAM=`basename $0`
USAGE="Usage:  $PROGRAM [ patch file ]"

[ $# -lt 1 ] &amp;&amp; echo $USAGE &amp;&amp; exit 1

patch=$1
username=$METAUSER
password=$METAPASS
URL="http://updates.oracle.com/Orion/Download/download_patch/$patch"

while [ -z $username ]; do
   echo -n "Enter metalink username: "
   read username
done

while [ -z $password ]; do
   echo -n "Enter metalink password: "
   stty -echo
   read password
   stty echo
done

wget --http-user=$username 
--http-password=$password 
--no-check-certificate  
--output-document=$patch $URL

exit

It’s pretty basic, so you can add error checking or more sophisticated wget options as you like.  The only thing you need is the full name of the patch zip file and your Metalink credentials:

$ download.sh <zip file>;

You can export your Metalink username and password to the variables $METAUSER and $METAPASS, respectively, or the script will prompt you for both.

Let me know how this works for you, or if you have a better option – I’m sure there are plenty out there.

Related posts:

  1. 9 reasons why the new Metalink sucks
  2. Disable Flash for Oracle Metalink
  3. Use Autoconfig for common system administrator tasks

Filed Under: Oracle, Oracle Applications Tagged With: Metalink, Oracle DBA

Categories

  • Amazon Web Services
  • Configuration Management
  • downtime
  • Drizzle
  • ebs
  • Education
  • elastic block store
  • elastic compute cloud
  • hosting
  • hot backup
  • ignorance
  • Infrastructure
  • IOUG
  • Jeremiah Wilton's Oradeblog
  • misconception
  • misconceptions
  • Monocle
  • MySQL
  • MySQL Council
  • News & Events
  • Oracle
  • Oracle Applications
  • Oracle Data Guard
  • Oracle Database
  • Oracle Database Appliance
  • Our People
  • OurSQL Community Podcast
  • outage
  • parallel
  • performance
  • podcast
  • proof
  • Remote DBA
  • replication
  • S3
  • Security
  • SQL Server
  • System monitoring
  • Uncategorized

Contact Blue Gecko

  • This field is for validation purposes and should be left unchanged.

Get Our Newsletter

  • This field is for validation purposes and should be left unchanged.

The Fine Print

  • Privacy Policy
  • Terms of Use
  • When is remote DBA the right solution
  • What are remote DBA services
  • Get Help

Blog Categories

  • 24/7 support
  • Blue Gecko 360° Services
  • Products Supported 24/7

Virtual runs

Contact Blue Gecko

Blue Gecko A/S
Slotsgade 21
DK – 4200 Slagelse
Denmark
Phone: (DK) +45 70 60 51 20

Networks

  • Email
  • Twitter

© Blue Gecko Group