Accepted Solution

Referencing to profile and config variables?

[ Edited ]

Hi, there's any way to referencing to profile directory and config name from a config file?

Something to pass to the ARCHIVE_CMDxx= in a standard way instead of having to configure it manually for every config?


I launch /opt/SnapCreator/scServer3.4.0/snapcreator --verbose --policy daily --profile TestProfile --config testoracleaonline --global --action snap

and i can define something like:

ARCHIVE_CMD01=/opt/SnapCreator/scServer3.4.0/snapcreator --verbose --policy %SNAP_TYPE --profile %PROFILE --config %CONFIG --global --action arch


Referencing to profile and config variables?


I think you can use %CONF_NAME and %CONF_DIR. But I doubt about the usage of calling another action as commandline.


Referencing to profile and config variables?

Thanks for the answer, i'll try to' test it today. I've tested the run of action arch at the end of the normal full backup of oracle to delete old archive logs and it seems to work correctly.

Re: Referencing to profile and config variables?

You can do something like this in config



CONFNAME = profile

CONFDIR = config directoy

On a single line you can only reference one variable with % so doing echo "%CONFNAME %CONFDIR" wouldnt work.

Passing the %CONFNAME and %CONFDIR in as CLI arguments wont work unfortunately since they are not set till run time.



Referencing to profile and config variables?

I think it's all solved (probably I did not understood how archiving was working)...

I was thinking that i should run the snapcreator --action arch to do archive log deletion but I saw that configuring the archivelog command inside the config file at the end of the backup of oracle it will automatically do an "arch" step so it will delete older then 1 day archivelogs automatically while doing the backup.

Is this the correct behaviour? in the manual I think the archive part is not well documented... it just say how to config it but not that it will do archive automatically at end of database backup.

Referencing to profile and config variables?

If you configure ARCHIVE* settings and set ARCHIVE_LOG_ENABLE=Y then SC will delete archive logs based on retention.

Your other option if you want to use something custom is using the ARCHIVE_CMDxx, this allows you to run scripts or command to handle archive log MGMT.

Does this make sense?


Referencing to profile and config variables?

Yes Keith the only think I was misunderstanding is that I was thinking that I should use "snapcreator --action arch" after the --action snap (so I was thinking to put the run of snapcreator --action arch inside a ARCHIVE_CMDxx into the same config used by --action snap).

Instead it's already running the archive procedure after the backup was done. So it's all ok And a really nice feature



Referencing to profile and config variables?

Yep --action arch allows you to run archive log handling only outside of SC. Mostly you wouldnt need this but if you wanted to handle archive logs outside of backup SC could do that. We recommend setting up snapvault or snapmirror and then deleting archive logs as part of backup. With SnapMirror make sure you set NTAP_CLONE_SECONDARY=Y or with PM NTAP_PM_RUN_BACKUP=Y so SC waits for completion and we know it is safe to delete archive logs. Otherwise archive logs could be deleted before we can copy them to secondary.