docs/ImportExport/Attachment-Migration-System.md
The Enhanced Attachment Migration System provides a comprehensive solution for managing attachment storage across multiple backends (filesystem, MongoDB GridFS, S3/MinIO) with CPU throttling, real-time monitoring, and secure configuration management.
WRITABLE_PATH# Base writable path for all file storage
WRITABLE_PATH=/data
# Attachments will be stored at: ${WRITABLE_PATH}/attachments
# Avatars will be stored at: ${WRITABLE_PATH}/avatars
# S3 configuration (JSON format)
S3='{"s3":{"key":"access-key","secret":"secret-key","bucket":"bucket-name","endPoint":"s3.amazonaws.com","port":443,"sslEnabled":true,"region":"us-east-1"}}'
# Alternative: S3 secret file (Docker secrets)
S3_SECRET_FILE=/run/secrets/s3_secret
All settings can be adjusted through the admin panel:
// Start migration
Meteor.call('startAttachmentMigration', {
targetStorage: 'filesystem', // 'filesystem', 'gridfs', 's3'
batchSize: 10,
delayMs: 1000,
cpuThreshold: 70
});
// Pause migration
Meteor.call('pauseAttachmentMigration');
// Resume migration
Meteor.call('resumeAttachmentMigration');
// Stop migration
Meteor.call('stopAttachmentMigration');
// Get storage configuration
Meteor.call('getAttachmentStorageConfiguration');
// Test S3 connection
Meteor.call('testS3Connection', { secretKey: 'new-secret-key' });
// Save S3 settings
Meteor.call('saveS3Settings', { secretKey: 'new-secret-key' });
// Get monitoring data
Meteor.call('getAttachmentMonitoringData');
// Refresh monitoring data
Meteor.call('refreshAttachmentMonitoringData');
// Export monitoring data
Meteor.call('exportAttachmentMonitoringData');
// Subscribe to migration status
Meteor.subscribe('attachmentMigrationStatus');
// Subscribe to monitoring data
Meteor.subscribe('attachmentMonitoringData');
For issues and questions:
This Enhanced Attachment Migration System is part of Wekan and is licensed under the MIT License.