The migration from Nextcloud to Azure S3 was driven by issues with performance, infrastructure impact, and architectural challenges.
Nextcloud's stability and performance problems, including frequent downtime and delays, led to the decision to seek a more scalable solution like Azure S3.
Architectural issues, like direct access to storage servers and hardcoded URLs in PDFs pointing to specific servers, motivated the transition to a more centralized service approach.
The migration plan involved routing all downloads and uploads through a service, migrating existing documents to Azure storage, and managing legacy Nextcloud links in exported PDFs.
Challenges in the migration process included token management for document identification, implementing document previews, optimizing PDFs and images, and ensuring proper HTTP headers for file downloads.
Security measures included monitoring for spoofed HTTP headers, scanning files for viruses, and using tools like clamscan to ensure file safety.
Monitoring and maintaining control over usage, logs, and metrics were highlighted as critical for infrastructure stability.
The migration process involved data extraction, setting up the environment, and transferring resources from Nextcloud to Azure using a specialized Node.js API.
Managing legacy URLs in PDFs required establishing a microservice with SQLite database support to correlate tokens with tenant IDs, allowing for efficient URL rewriting and redirection.
The project emphasized the importance of meticulous planning, efficient data handling, and adapting to unexpected challenges for a successful migration from Nextcloud to Azure S3.