# alexbaik

##### **📦PBX Voice Recording Backup &amp; Web Access Plan**

#####   
**✅ Scope**

  
\- Automatically archive and transfer PBX call recordings from GCP-hosted Linux servers to an on-premises FTP server.  
\- Provide web-based, password-protected access to recordings for internal staff.

##### **🔁 Daily/Weekly Backup Workflow**

  
Step 1: Prepare the PBX Nodes (GCP Linux Hosts)**  
\- Confirm recordings are stored under structured directories like:  
/var/lib/freeswitch/recordings/{hostname}/archive/{year}/{month}/  
\- Ensure correct file ownership (e.g. www-data) and read access.  
**Step 2: Create a Bash Script for Scheduled Archiving**  
\- Script will:  
\- Compress the current day/week’s recordings into a dated .tar.gz archive.  
\- Upload the archive securely to the FTP/scp server.

  
**Step 3: Automate with Cron**  
\- Schedule the script at 12:01 AM weekly or daily, depending on retention needs:

##### **🌐 Web Access Setup (On-Prem FTP Server)**

  
Step 4: Install IIS &amp; Configure Web Root  
\- Set FTP destination path as IIS web root:  
C:\\inetpub\\wwwroot\\pbx-recordings  
\- Configure basic authentication.  
Step 5: Implement Access Restrictions  
\- Restrict login to local subnet IPs (e.g. 192.168.x.x) via IIS IP Restrictions.  
Step 6: Password-Protect Recording Directory  
\- Use IIS features or .htaccess equivalent to secure the /pbx-recordings folder.  
Step 7: Simple Listing Page (Optional)  
\- Create a minimal HTML index or use a file-listing tool for browsing recordings:

🔒 Security Checklist  
\- ✅ Use strong FTP/SCP credentials.  
\- ✅ Validate archive before upload.  
\- ✅ Enable firewall rules to limit access.  
\- ✅ Monitor backups and access logs.