Files
ROMFASTSQL/oracle
Marius 4256d5a914 Oracle DR: Optimize backup copy - TestMode only copies latest backup set
Major performance optimization for weekly DR tests:

TestMode (weekly testing):
- Copy ONLY latest full backup + everything after it
- Includes: latest DAILY_FULL + incrementals + controlfiles + SPFILE
- Excludes: older full backups (not needed for testing)
- Benefit: ~60-70% reduction (14GB → 4-5GB)
- Copy time: 2min → 30-45sec (saves ~1-1.5 min)
- Risk: Low - testing only needs to verify latest backup works

Standalone Mode (real DR):
- Copy ALL backups (unchanged behavior)
- Includes: all full backups + redundancy for fallback
- Benefit: Maximum safety for disaster recovery
- If latest backup corrupted → RMAN uses previous backup

Implementation:
- Finds latest *DAILY_FULL*.BKP (Level 0 backup)
- Gets its timestamp
- Copies all *.BKP files >= that timestamp
- Automatic inclusion of incrementals, controlfiles, SPFILE backups

Combined optimization results:
- VM polling: saves 60-120s
- Service preservation: saves 40s
- Backup copy (TestMode): saves 60-90s
Total: 160-250 seconds (2.5-4 minutes) per test

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-10-11 14:58:12 +03:00
..
2025-10-06 18:53:45 +03:00