The Wild

SharePoint & OneDrive to Nextcloud: File Migration Guide

· 5 min read · Mammals

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Migrating files from SharePoint or OneDrive to Nextcloud lets you consolidate your cloud storage under one self-hosted roof, giving you full control over your data. This guide walks you through the entire process, from preparing your sources to verifying the final copy. You'll need admin access to your Nextcloud instance and, for SharePoint, the ability to sync files to your local machine or use a migration tool.

What You'll Need

  • Access to the SharePoint site or OneDrive account you're migrating from.
  • Admin login to your Nextcloud server (or at least write permissions to the target folder).
  • Sufficient local disk space to hold a temporary copy of the files if you're using the sync-and-upload method.
  • Optional: A migration tool like rclone, which can connect directly to both sources and Nextcloud.

Step-by-Step

  1. Assess what you have. Log into SharePoint or OneDrive and review the folder structure. Note the total size and number of files. Check for any files with special characters (like #, %, or &) that might cause issues during transfer.
  2. Prepare Nextcloud. Log into your Nextcloud web interface and create a target folder, e.g., /Migration. Ensure you have enough storage quota for the incoming data.
  3. Choose your migration method. For small migrations (under 50 GB), the sync-and-upload method works fine. For larger or recurring migrations, use rclone or another tool that can copy directly between cloud services.
  4. Method A: Sync and Upload (for smaller sets).
    1. Install the OneDrive sync client on a local machine and sync the SharePoint library or OneDrive folder you want to migrate.
    2. Once synced, install the Nextcloud desktop client on the same machine.
    3. Configure the Nextcloud client to sync the local folder that contains your downloaded files to the /Migration folder on your server.
    4. Let the sync complete. Verify that all files appear in Nextcloud.
  5. Method B: Using rclone (for larger or direct transfers).
    1. Install rclone on your local machine or a server that can reach both sources.
    2. Configure rclone remotes for OneDrive (or SharePoint) and for Nextcloud. Use rclone config and follow the prompts.
    3. Test the connections with rclone lsd remote: to list directories.
    4. Run the copy command: rclone copy "onedrive:Documents" "nextcloud:Migration" --progress. This copies files without deleting anything on the destination.
    5. After the copy, run rclone check to verify integrity.
  6. Handle metadata and permissions. Note that standard file migration does not carry over SharePoint permissions or metadata (like custom columns). If you need those, export them separately or use a specialized tool.
  7. Verify the migration. In Nextcloud, spot-check folders and file counts. Compare the total file count and size between source and destination.
  8. Communicate with users. If this is a team migration, inform users about the new location and any changes in access permissions.
  9. Clean up. Once you're confident everything is in place, you can delete the source files from SharePoint/OneDrive (after a backup period).

Common Mistakes

  • Not checking for filename length limits. Nextcloud (and most Linux filesystems) support up to 255 bytes per filename, but SharePoint allows longer names. Files with names longer than 255 characters will fail to copy.
  • Ignoring file-in-use locks. If someone has a file open in SharePoint or OneDrive, it may be locked and skipped. Ensure no one is editing during the migration.
  • Copying instead of moving when you intend to move. Using rclone copy leaves the source intact, which is safer, but if you later delete the source, make sure you have a backup.
  • Forgetting to enable the Nextcloud app "External storage" if you plan to mount SharePoint directly—this is not recommended for migration but is a common confusion.
  • Not accounting for version history. If you need version history, you must export it separately; a simple file copy loses it.

Tips

  • Do a test migration with a small folder first to validate the process.
  • Use rclone --dry-run to preview what will be copied without actually transferring.
  • Schedule the migration during off-peak hours to minimize impact on users.
  • If you have many small files, consider zipping them into archives for faster transfer, then unzip on the Nextcloud server (if you have shell access).
  • Use the Nextcloud occ command occ files:scan after uploading via external tools to ensure the file index is updated.

Troubleshooting

  • Files are missing after migration. Check the rclone log or sync client log for errors. Common causes: filenames with unsupported characters, files locked, or exceeded storage quota.
  • Transfer is very slow. If using rclone, try increasing the number of parallel transfers with --transfers 8. Also check your network bandwidth and the Nextcloud server's upload limit.
  • Nextcloud shows "File not found" errors. This often happens when the file was uploaded but not scanned. Run occ files:scan --path=/username/files/Migration from the Nextcloud server's command line.
  • Permission errors on Nextcloud. Ensure the target folder's owner has write permissions. If you're using the web interface, check the folder's sharing settings.
  • rclone can't authenticate with SharePoint. SharePoint often requires an app registration in Azure AD. Follow the rclone documentation for SharePoint-specific setup.

Frequently Asked Questions

Can I migrate directly from SharePoint to Nextcloud without downloading to my computer?

Yes, using rclone or a similar tool that supports both SharePoint and Nextcloud as remotes. This avoids local storage requirements but requires careful configuration.

Will file permissions be preserved?

No. Standard file copies do not carry over SharePoint's permission settings. You'll need to recreate them in Nextcloud using groups and sharing.

What about OneDrive Personal vs OneDrive for Business?

The process is similar, but authentication differs. OneDrive Personal uses a Microsoft account, while OneDrive for Business uses Azure AD. rclone handles both, but the setup steps differ.

How long will the migration take?

It depends on the total data size, your internet speed, and the server's performance. A rough estimate is 1–2 hours per 10 GB on a typical broadband connection, but this varies widely.

Can I automate the migration to run regularly?

Yes, rclone can be run as a cron job or scheduled task. Use rclone sync to make the destination match the source, but be careful because sync deletes files that are not in the source.

What happens to shared links from SharePoint/OneDrive?

They will break. You'll need to recreate any necessary sharing links in Nextcloud after migration.