The plugin has been installed and is ready to use. It's located at plugins/flowsa/asset-sync/.
Your site currently has:
- Volume: "Files" (handle:
files) - Local Filesystem:
files(@webroot/uploads/files) - R2 Filesystem:
cloudFiles(Cloudflare R2, already configured) - Assets Found: 9,166 files
Test what will happen without actually copying files:
ddev craft asset-sync/sync --volume=files --destination-filesystem=cloudFiles --dry-runThis will:
- Show exactly what files will be copied
- Display progress as it scans
- Not modify any files
- Report any errors it finds
Once you're confident, run the actual sync:
ddev craft asset-sync/sync --volume=files --destination-filesystem=cloudFilesYou'll see:
- Configuration summary
- Asset count (9,166 files)
- Confirmation prompt
- Real-time progress bar
- Final report with copied/skipped/failed counts
Note: This may take some time with 9,166 assets. The sync will:
- Skip files that already exist in R2
- Continue from where it left off if interrupted
- Log all errors for review
After successful sync, update the volume configuration:
# Edit the volume config file
nano config/project/volumes/files--c99ad3ba-ce06-4638-953f-6723cc4ab85d.yaml
# Change line 94:
# FROM: fs: files
# TO: fs: cloudFilesOr use this command:
sed -i '' 's/fs: files/fs: cloudFiles/' config/project/volumes/files--c99ad3ba-ce06-4638-953f-6723cc4ab85d.yamlddev craft project-config/apply- Visit the control panel and check assets load correctly
- Test asset URLs in your frontend
- Verify image transforms work
- Check that new uploads go to R2
Once verified (wait a few days):
- Keep local files as backup for a while
- Monitor for any issues
- Eventually remove local files to save space
--volume=<handle>- The asset volume to sync (e.g.,files)--destination-filesystem=<handle>- Target filesystem (e.g.,cloudFiles)
--dry-run- Preview mode, no files copied--force- Skip confirmation prompt
-vfor--volume-dfor--destination-filesystem-nfor--dry-run-ffor--force
# Preview sync
ddev craft asset-sync/sync -v files -d cloudFiles -n
# Execute with confirmation
ddev craft asset-sync/sync --volume=files --destination-filesystem=cloudFiles
# Execute without confirmation (automated scripts)
ddev craft asset-sync/sync -v files -d cloudFiles -f✅ Included:
- All asset files
- Directory structure
- File paths (stay identical)
✅ Preserved:
- Asset IDs
- Asset metadata (titles, alt text, etc.)
- Custom field values
- Focal points
- Database references
❌ Not Synced:
- Transforms (regenerated on-demand)
- Temporary files
With 9,166 assets, this is normal. The sync can be interrupted and resumed - it skips files already in R2.
- Verify R2 credentials in
.env - Check R2 bucket name matches config
- Ensure bucket permissions allow public access
- Check filesystem URL configuration
Check the error report at the end of sync. Common issues:
- Missing source files (already deleted)
- Permission issues
- Network timeouts (re-run to resume)
If you need to switch back to local storage:
# Edit volume config
sed -i '' 's/fs: cloudFiles/fs: files/' config/project/volumes/files--c99ad3ba-ce06-4638-953f-6723cc4ab85d.yaml
# Apply changes
ddev craft project-config/applyFor issues or questions, contact Flow Communications.