Oracle DR: Complete Phase 5 - NFS mount point configuration
Phase 5 implementation completed: - NFS server installed on Proxmox (nfs-kernel-server) - NFS export configured: /mnt/pve/oracle-backups → VM 109 - Windows NFS Client enabled in VM 109 - F:\ drive auto-mount at startup via scheduled task - PowerShell script: D:\Oracle\Scripts\mount-nfs.bat - Directory permissions set to 777 for Windows compatibility - Mount persists across VM reboots Files updated: - DR_UPGRADE_TO_CUMULATIVE_PLAN.md: Status → Phases 1-3-5 COMPLETED - Added detailed Phase 5 documentation with step-by-step setup - Updated validation checklist (8 items completed) Next: Phases 4, 6, 7 (scheduled tasks, restore script, testing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Oracle DR - Upgrade to Cumulative Incremental Backup Strategy
|
||||
|
||||
**Generated:** 2025-10-09
|
||||
**Last Updated:** 2025-10-09 19:00
|
||||
**Status:** 🟡 IN PROGRESS - Phases 1-3 COMPLETED
|
||||
**Last Updated:** 2025-10-10 00:45
|
||||
**Status:** 🟡 IN PROGRESS - Phases 1-3-5 COMPLETED
|
||||
**Objective:** Implement cumulative incremental backups with Proxmox host storage for optimal RPO/RTO
|
||||
**Target RPO:** 3-4 hours (vs current 24 hours)
|
||||
**Target RTO:** 12-15 minutes (unchanged)
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
## ✅ IMPLEMENTATION STATUS
|
||||
|
||||
### Completed (2025-10-09)
|
||||
### Completed (2025-10-09 + 2025-10-10)
|
||||
- ✅ **Phase 1:** Proxmox host storage configured (`/mnt/pve/oracle-backups/ROA/autobackup`)
|
||||
- ✅ **Phase 2:** RMAN script already has `CUMULATIVE` keyword
|
||||
- ✅ **Phase 3:** Transfer scripts updated to send to Proxmox (10.0.20.202:22, root)
|
||||
@@ -19,13 +19,20 @@
|
||||
- Changed from VM 109 (10.0.20.37:22122) to Proxmox host
|
||||
- Converted Windows PowerShell commands to Linux bash
|
||||
- ✅ **VM 109 cleanup:** Deleted temporary files, old backups (~6.4 GB freed)
|
||||
- ✅ **Phase 5:** NFS mount point configured on VM 109 → **F:\ drive**
|
||||
- NFS server installed on Proxmox: `nfs-kernel-server`
|
||||
- NFS export configured: `/mnt/pve/oracle-backups → 10.0.20.37 (rw,no_root_squash)`
|
||||
- NFS Client enabled in Windows VM 109
|
||||
- Mount command: `mount -o rw,nolock,mtype=hard,timeout=60 10.0.20.202:/mnt/pve/oracle-backups F:`
|
||||
- PowerShell scheduled task created for auto-mount at startup (`D:\Oracle\Scripts\mount-nfs.bat`)
|
||||
- Permissions set to 777 on Proxmox directory
|
||||
- **Status:** F:\ mounts automatically at Windows startup ✅
|
||||
|
||||
### Pending (Next Session)
|
||||
- ⏳ **SSH Key Setup:** Run `copy_existing_key_to_proxmox.ps1` on PRIMARY as Administrator
|
||||
- Existing key: `C:\Windows\System32\config\systemprofile\.ssh\id_rsa`
|
||||
- Copy to: Proxmox `/root/.ssh/authorized_keys`
|
||||
- ⏳ **Phase 4:** Modify scheduled tasks (13:00 + 18:00)
|
||||
- ⏳ **Phase 5:** Configure mount point on VM 109 (will appear as F:\)
|
||||
- ⏳ **Phase 4:** Modify scheduled tasks on PRIMARY (13:00 + 18:00)
|
||||
- ⏳ **Phase 6:** Update restore script to use F:\ mount
|
||||
- ⏳ **Phase 7:** Test FULL + CUMULATIVE backup and restore
|
||||
|
||||
@@ -36,6 +43,14 @@ oracle/standby-server-scripts/
|
||||
├── transfer_to_dr.ps1 [MODIFIED] → Proxmox host
|
||||
├── rman_backup_incremental.txt [ALREADY OK] → Has CUMULATIVE
|
||||
└── copy_existing_key_to_proxmox.ps1 [NEW] → Setup script for SSH key
|
||||
|
||||
VM 109 (Windows):
|
||||
├── C:\Scripts\mount-nfs.ps1 [NEW] → PowerShell script for NFS mount
|
||||
└── Scheduled Task: "Mount NFS F" [NEW] → Auto-mount at startup
|
||||
|
||||
Proxmox (pveelite):
|
||||
├── /etc/exports [MODIFIED] → NFS export configuration
|
||||
└── /mnt/pve/oracle-backups/ [PERMISSIONS] → chmod 777
|
||||
```
|
||||
|
||||
---
|
||||
@@ -340,11 +355,120 @@ Get-ScheduledTask | Where-Object {$_.TaskName -like "*Oracle*"} |
|
||||
|
||||
---
|
||||
|
||||
### PHASE 5: Update DR Restore Script (30 minutes)
|
||||
### PHASE 5: Configure NFS Mount Point on VM 109 (30 minutes) ✅ COMPLETED
|
||||
|
||||
**Objective:** Update restore script to read backups from mount point (E:\) and handle cumulative backups
|
||||
**Objective:** Mount Proxmox backup storage as F:\ drive in Windows VM using NFS
|
||||
|
||||
#### 5.1 Modifică scriptul de restore existent pentru cumulative backups
|
||||
**Status:** ✅ COMPLETED on 2025-10-10
|
||||
|
||||
#### 5.1 Install and configure NFS server on Proxmox
|
||||
```bash
|
||||
# SSH to Proxmox host
|
||||
ssh root@10.0.20.202
|
||||
|
||||
# Install NFS server
|
||||
apt install -y nfs-kernel-server
|
||||
|
||||
# Configure NFS export
|
||||
echo '/mnt/pve/oracle-backups 10.0.20.37(rw,sync,no_subtree_check,no_root_squash)' >> /etc/exports
|
||||
|
||||
# Apply export configuration
|
||||
exportfs -ra
|
||||
|
||||
# Set permissions for Windows compatibility
|
||||
chmod -R 777 /mnt/pve/oracle-backups
|
||||
|
||||
# Verify export
|
||||
showmount -e localhost
|
||||
# Expected output: /mnt/pve/oracle-backups 10.0.20.37
|
||||
```
|
||||
|
||||
#### 5.2 Enable NFS Client in Windows VM 109
|
||||
```powershell
|
||||
# SSH to VM 109
|
||||
ssh -p 22122 romfast@10.0.20.37
|
||||
|
||||
# Enable NFS Client feature
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName ServicesForNFS-ClientOnly -All -NoRestart
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName ClientForNFS-Infrastructure -All -NoRestart
|
||||
Enable-WindowsOptionalFeature -Online -FeatureName NFS-Administration -All -NoRestart
|
||||
|
||||
# Verify installation
|
||||
Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -like "*NFS*"}
|
||||
```
|
||||
|
||||
#### 5.3 Create PowerShell mount script with auto-retry
|
||||
```powershell
|
||||
# Create Scripts directory
|
||||
mkdir C:\Scripts
|
||||
|
||||
# Create mount script
|
||||
notepad C:\Scripts\mount-nfs.ps1
|
||||
```
|
||||
|
||||
**Content of `C:\Scripts\mount-nfs.ps1`:**
|
||||
```powershell
|
||||
Start-Sleep -Seconds 10
|
||||
|
||||
# Wait for NFS Client service
|
||||
$timeout = 60
|
||||
$elapsed = 0
|
||||
while ($elapsed -lt $timeout) {
|
||||
$nfsService = Get-Service | Where-Object {$_.Name -like "*NFS*" -and $_.Status -eq "Running"}
|
||||
if ($nfsService) { break }
|
||||
Start-Sleep -Seconds 5
|
||||
$elapsed += 5
|
||||
}
|
||||
|
||||
# Unmount F: if exists
|
||||
try { & umount F: 2>$null } catch {}
|
||||
|
||||
# Mount NFS share
|
||||
Start-Sleep -Seconds 5
|
||||
& mount -o rw,nolock,mtype=hard,timeout=60 10.0.20.202:/mnt/pve/oracle-backups F:
|
||||
|
||||
# Log result
|
||||
"$(Get-Date) - Mount completed" | Out-File C:\Scripts\mount-nfs.log -Append
|
||||
```
|
||||
|
||||
#### 5.4 Create scheduled task for auto-mount at startup
|
||||
```cmd
|
||||
# Create scheduled task (run in CMD as Administrator)
|
||||
schtasks /create /tn "Mount NFS F" /tr "powershell.exe -ExecutionPolicy Bypass -File C:\Scripts\mount-nfs.ps1" /sc onstart /ru SYSTEM /rl HIGHEST /delay 0000:30 /f
|
||||
|
||||
# Verify task creation
|
||||
schtasks /query /tn "Mount NFS F"
|
||||
|
||||
# Test manual mount
|
||||
mount -o rw,nolock,mtype=hard,timeout=60 10.0.20.202:/mnt/pve/oracle-backups F:
|
||||
|
||||
# Verify mount
|
||||
dir F:\ROA\autobackup
|
||||
```
|
||||
|
||||
#### 5.5 Verification checklist
|
||||
- [x] NFS server running on Proxmox (port 2049)
|
||||
- [x] Export visible: `showmount -e 10.0.20.202`
|
||||
- [x] Windows NFS Client services enabled
|
||||
- [x] F:\ drive mounts successfully with manual command
|
||||
- [x] Scheduled task runs at startup
|
||||
- [x] F:\ persists after VM reboot
|
||||
- [x] Can create/read/write files on F:\ROA\autobackup
|
||||
|
||||
**⚠️ IMPORTANT NOTES:**
|
||||
- NFS uses IP-based authentication (no username/password)
|
||||
- Only VM 109 (10.0.20.37) can access the share
|
||||
- `no_root_squash` allows Windows to write as root
|
||||
- Permissions 777 on Proxmox ensure Windows compatibility
|
||||
- Mount point is **F:\** (not E:\, which is already in use)
|
||||
|
||||
---
|
||||
|
||||
### PHASE 6: Update DR Restore Script (30 minutes)
|
||||
|
||||
**Objective:** Update restore script to read backups from F:\ mount point and handle cumulative backups
|
||||
|
||||
#### 6.1 Modifică scriptul de restore existent pentru cumulative backups
|
||||
**Fișier:** `D:\oracle\scripts\rman_restore_final.cmd` (scriptul tău existent)
|
||||
|
||||
**Modificări necesare:**
|
||||
@@ -493,11 +617,11 @@ exit /b 0
|
||||
|
||||
---
|
||||
|
||||
### PHASE 6: Weekly Test Procedure (1 hour first time, 30 min ongoing)
|
||||
### PHASE 7: Weekly Test Procedure (1 hour first time, 30 min ongoing)
|
||||
|
||||
**Objective:** Document weekly test procedure using new cumulative backup strategy
|
||||
|
||||
#### 6.1 Test procedure (run on Saturday morning)
|
||||
#### 7.1 Test procedure (run on Saturday morning)
|
||||
```bash
|
||||
# On Linux workstation or any machine with SSH to Proxmox
|
||||
|
||||
@@ -543,7 +667,7 @@ ssh root@10.0.20.202 "qm shutdown 109"
|
||||
ssh root@10.0.20.202 "qm status 109"
|
||||
```
|
||||
|
||||
#### 6.2 Create automated test script
|
||||
#### 7.2 Create automated test script
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# File: /root/scripts/test_oracle_dr.sh
|
||||
@@ -669,17 +793,23 @@ Register-ScheduledTask -Xml (Get-Content "D:\rman_backup\backup_tasks\Oracle RMA
|
||||
|
||||
After completing implementation:
|
||||
|
||||
- [ ] Proxmox host directory created: `/mnt/pve/oracle-backups/ROA/autobackup`
|
||||
- [ ] VM 109 mount point configured and tested (E:\ visible in Windows)
|
||||
- [ ] RMAN script modified to CUMULATIVE (keyword added)
|
||||
- [ ] New transfer script created (`02_transfer_to_pveelite_host.ps1`)
|
||||
- [x] Proxmox host directory created: `/mnt/pve/oracle-backups/ROA/autobackup`
|
||||
- [x] NFS server installed and configured on Proxmox
|
||||
- [x] NFS export configured for VM 109 (10.0.20.37)
|
||||
- [x] NFS Client enabled in Windows VM 109
|
||||
- [x] F:\ mount point configured and tested (NFS mount working)
|
||||
- [x] PowerShell mount script created (`C:\Scripts\mount-nfs.ps1`)
|
||||
- [x] Scheduled task "Mount NFS F" created for auto-mount at startup
|
||||
- [x] F:\ drive persists after VM reboot
|
||||
- [ ] RMAN script modified to CUMULATIVE (keyword added) - **Already has CUMULATIVE**
|
||||
- [ ] Transfer scripts updated to send to Proxmox host
|
||||
- [ ] SSH key for Proxmox host created and tested
|
||||
- [ ] Scheduled task created for 13:00 CUMULATIVE backup
|
||||
- [ ] Scheduled task created for 18:00 CUMULATIVE backup
|
||||
- [ ] Scheduled task created for 13:00 CUMULATIVE backup on PRIMARY
|
||||
- [ ] Scheduled task created for 18:00 CUMULATIVE backup on PRIMARY
|
||||
- [ ] Existing 02:30 FULL task updated to use new transfer script
|
||||
- [ ] Manual test of CUMULATIVE backup successful
|
||||
- [ ] Manual test of backup transfer to host successful
|
||||
- [ ] DR restore script updated (`rman_restore_cumulative.cmd`)
|
||||
- [ ] DR restore script updated to use F:\ mount
|
||||
- [ ] Full end-to-end restore test successful
|
||||
- [ ] Weekly test script created and tested
|
||||
- [ ] Documentation updated (STATUS and IMPLEMENTATION_PLAN docs)
|
||||
@@ -688,23 +818,37 @@ After completing implementation:
|
||||
|
||||
## 📞 NEXT SESSION HANDOFF
|
||||
|
||||
**Status:** PLAN COMPLETE - Ready for implementation
|
||||
**Estimated Implementation Time:** 2-3 hours
|
||||
**Status:** 🟡 PHASES 1-3-5 COMPLETED - Continue with Phases 4, 6, 7
|
||||
**Estimated Remaining Time:** 1.5-2 hours
|
||||
**Recommended Schedule:** Saturday morning (low activity time)
|
||||
|
||||
**Context for next session:**
|
||||
1. Primary server: 10.0.20.36 (Windows, Oracle 19c, database ROA)
|
||||
2. DR VM: 109 on pveelite (10.0.20.37, currently working with FULL-only restore)
|
||||
3. Proxmox host: pveelite (10.0.20.202)
|
||||
4. Goal: Implement CUMULATIVE incremental backups (13:00 + 18:00) for better RPO (4-5 hours vs 24 hours)
|
||||
5. Key change: Backups stored on Proxmox host, mounted in VM 109 when needed
|
||||
2. DR VM: 109 on pveelite (10.0.20.37, **F:\ NFS mount configured and working** ✅)
|
||||
3. Proxmox host: pveelite (10.0.20.202, **NFS server running** ✅)
|
||||
4. Goal: Complete scheduled tasks on PRIMARY + update restore script + test end-to-end
|
||||
5. **Completed:** Storage setup, NFS mount, transfer scripts to Proxmox
|
||||
|
||||
**Start implementation with:**
|
||||
**What's DONE:**
|
||||
- ✅ Proxmox host storage (`/mnt/pve/oracle-backups/ROA/autobackup`)
|
||||
- ✅ NFS server on Proxmox with export for VM 109
|
||||
- ✅ NFS Client in Windows VM 109
|
||||
- ✅ F:\ drive auto-mounts at startup via scheduled task
|
||||
- ✅ Transfer scripts modified to send to Proxmox host
|
||||
- ✅ RMAN script already has CUMULATIVE keyword
|
||||
|
||||
**Next steps to complete:**
|
||||
```bash
|
||||
# Phase 1 - Proxmox host storage setup (15 min)
|
||||
ssh root@10.0.20.202
|
||||
mkdir -p /mnt/pve/oracle-backups/ROA/autobackup
|
||||
# ... follow Phase 1 steps
|
||||
# Phase 4 - Update scheduled tasks on PRIMARY (45 min)
|
||||
# 1. Setup SSH key from PRIMARY to Proxmox
|
||||
# 2. Test transfer scripts
|
||||
# 3. Create/modify scheduled tasks for 13:00 and 18:00
|
||||
|
||||
# Phase 6 - Update DR restore script (30 min)
|
||||
# Modify restore script to use F:\ instead of local path
|
||||
|
||||
# Phase 7 - End-to-end test (30 min)
|
||||
# Full test: backup → transfer → mount → restore
|
||||
```
|
||||
|
||||
**IMPORTANT - Backup manual înainte de modificări:**
|
||||
|
||||
Reference in New Issue
Block a user