Storage Management (ASM ACFS DNFS ODM) (MOSC)

MOSC Banner

How can I check if a file exists in ASM via shell script?

Products: Oracle 19c EE, RAC, ASM, OEL Linux 8

I am trying to write a shell script that loops through our CDBs on a given host and copies the wallet files from ASM to a local filesystem for an additional backup.

Not all of our databases use TDE, so I'm trying to execute a check to see if the wallet file exists before executing the line to make the file copy.

If this was a normal filesystem, I could use something like:

if [ -f /u01/TESTCDB/tde/ewallet.p12 ]; then
echo "file exists"
else
echo "file does not exist"
fi

However, I obviously can't put an ASM path in there, such as:

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center