Azure Databases to WD Mycloud EX4100 backup
Since EX4100 runs My Cloud OS5 with support for SMB/NFS and apps like rsync, but not direct Azure SQL/Azure Database connectors, you’ll need to set up an intermediate backup workflow.
Here’s a clear guide:
🔹 Step 1: Decide Backup Type
Azure databases (e.g., Azure SQL Database, Azure MySQL, Azure PostgreSQL) don’t directly push backups to a NAS. Instead, you:
Export the database (BACPAC, dump, or backup file).
Store it in Azure Blob Storage or a local machine/VM.
Transfer it to your EX4100 NAS.
🔹 Step 2: Backup from Azure Database
For Azure SQL Database:
Use Azure Portal or SQL Server Management Studio (SSMS):
Export to a .bacpac file.
Save it to Azure Storage or download locally.
For Azure MySQL / PostgreSQL:
Use native dump tools:
mysqldump -h <your_azure_mysql_host> -u <user> -p <db_name> > backup.sql
pg_dump -h <your_azure_pg_host> -U <user> -d <db_name> -F c -b -v -f backup.dump
These can run from an Azure VM or a local Windows/Linux machine.
🔹 Step 3: Transfer to WD My Cloud EX4100
You now have the backup files (BACPAC, SQL dump, etc.). Options to move them:
Direct SMB Mount (Windows/Linux → NAS)
Map EX4100 as a network drive (\\MYCLOUDEX4100\Backups).
Save backups directly to that folder from your dump/export script.
Rsync / SCP (Linux)
Enable SSH on EX4100 (via Dashboard → Settings → Network → SSH).
Push backups with rsync:
rsync -avz backup.sql user@ex4100:/shares/Backups/Azure
Scheduled Script
Create a cron job (Linux) or Task Scheduler job (Windows) that:
Runs mysqldump/pg_dump/export.
Copies the file to EX4100 share.
🔹 Step 4: Automate the Workflow
On a Windows Server/PC:
Use Task Scheduler → Run a PowerShell/Batch script nightly to dump Azure DB → copy file to Z:\AzureBackups (where Z: is EX4100).
On a Linux VM (in Azure or on-prem):
Cron job runs database dump → rsyncs it to EX4100.
🔹 Step 5: Verify & Retain Backups
Test restore at least once (import .bacpac, run mysql < backup.sql, etc.).
Keep multiple versions (date-stamped filenames). Example:
backup_azure_mysql_2025-09-30.sql
backup_azure_sql_2025-09-30.bacpac
Configure EX4100’s RAID + cloud sync (optional) to push backups to another service for redundancy.
✅ Summary:
Azure DB → Export/Dump → Save locally or Azure Storage → Transfer to EX4100 (SMB, rsync, SCP).
Use scripts + scheduler/cron to automate.
No direct one-click backup exists, but workflow is reliable once set.
Do you want me to write you a ready-to-use PowerShell script for Windows that will dump an Azure SQL Database and copy it straight to your EX4100?
0コメント