A busy database can generate few hundred gigabytes of archivelogs per day. Restoring these archive logs from tape backup is not ideal because it increases database recovery time. Regulatory requirements could mandate that these archive logs be preserved for several weeks.
To save storage costs, you can relocate archive logs older than two days (for example) into tier two storage. To achieve this you must create a policy file, for example, archive_policy.xml.
To relocate archive logs that are more than two days old to Tier-2
<?xml version="1.0"?> <!DOCTYPE PLACEMENT_POLICY SYSTEM "/opt/VRTSvxfs/etc\ /placement_policy.dtd"> <PLACEMENT_POLICY Version="5.0" Name="access_age_based"> <RULE Flags="data" Name="Key-Files-Rule"> <COMMENT> This rule deals with key files such as archive logs. </COMMENT>
<SELECT Flags="Data"> <COMMENT> You want all files. So choose pattern as '*' </COMMENT> <PATTERN> * </PATTERN> </SELECT>
<CREATE> <ON> <DESTINATION> <CLASS> tier1 </CLASS> </DESTINATION> </ON> </CREATE>
<RELOCATE> <TO> <DESTINATION> <CLASS> tier2 </CLASS> </DESTINATION> </TO> <WHEN> <ACCAGE Units="days"> <MIN Flags="gt">2</MIN> </ACCAGE> </WHEN> </RELOCATE>
</RULE> </PLACEMENT_POLICY>
Notice the ACCAGE units in the WHEN clause.
/opt/VRTSvxfs/etc
.The access age-based policy is appropriate for this use case. Pay attention to the CREATE ON and RELOCATE TO sections of the XML file.
To apply a policy file
# fsppadm validate /DBarch archive_policy.xml
# fsppadm assign /DBarch archive_policy.xml
# fsppadm enforce /DBarch