cancel
Showing results for 
Search instead for 
Did you mean: 

brbackup - querying the most recent directory

Former Member
0 Kudos
72

Before I hack my backup script, is there a cli where I can query the most recent

backup directory ? instead of look in initABC.sap for the backup_root etc and

looking for the last backup in the .../sapbackup/backxxx.log ?

For example in the initXXX.sap my backup_root is

/centos1/data2/sap01/PSM_DB_BACKUP

and an example output from a brbackup has in it

BR0106I Files will be saved on disk in directory: /centos1/data2/sap01/PSM_DB_BACKUP/bdushuca

or

BR0058I BRBACKUP action ID: bdushuca

Is there a cli that I can get something with the bdushuca in it ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

cli - sorry command line ...

i started looking at that log file, but not sure if the last line would be it,

say if a particular backup failed the subdirectory would not get created.

for now I'm sending the stdout of brbackup to a file, then when brbackup

is finished I'm using awk to find BR0106I then getting the directory from

that line.

by doing that I know that directory xyz is the one associated with this

backup.

works but though there may be a cleaner way.

-pete TOTALLY new to sap

former_member204746
Active Contributor
0 Kudos

name of all backup session is available in backSID.log (in sapbackup directory), you can certainly hack to use only the last entry (with command tail) and use the poper name (using command cut)

Is this what you want?

I am not 100% sure of what you mean by "cli"