Google Workspace has its hooks in everything: your email, your documents, your calendar, your contacts, your video calls, and even your file storage. Exporting all of that data into a self-hosted Nextcloud environment requires a systematic approach that addresses each service individually. This guide walks through every data category, from Drive files and email archives to calendar events and contact lists, with practical commands and processes for each.

For a broader perspective on why organizations are making this switch and what Nextcloud offers as a complete Google Workspace replacement, start with the complete guide to replacing Google and Microsoft with Nextcloud. If you are looking for the enterprise migration playbook with organizational planning, our enterprise Google Workspace to Nextcloud migration guide covers project management, stakeholder communication, and phased rollout strategies.

Google Takeout: Your Starting Point

What Google Takeout Exports

Google Takeout (takeout.google.com) is Google's official data export tool. It can export data from over 50 Google services, but for a Workspace migration, you care about these:

Running a Google Takeout Export

  1. Go to takeout.google.com while signed in to the Google Workspace account.
  2. Click "Deselect all" to start fresh, then select only the services you need (Drive, Mail, Calendar, Contacts).
  3. For Google Drive, click the options button to choose the export format for Google-native documents:
    • Google Docs: Export as DOCX (best for OnlyOffice) or ODT (best for Collabora/LibreOffice).
    • Google Sheets: Export as XLSX or ODS.
    • Google Slides: Export as PPTX or ODP.
  4. Choose delivery method: Download link via email, or export directly to another cloud service.
  5. Select file type (ZIP or TGZ) and maximum archive size (2 GB, 4 GB, 10 GB, or 50 GB). For large accounts, choose 50 GB to minimize the number of split archives.
  6. Click "Create export" and wait. Large exports can take hours or even days.

Admin tip: Google Workspace admins can use the Data Export tool in the Admin Console (admin.google.com > Account > Data Export) to export all users' data at once. This is significantly more efficient than having each user run Takeout individually. Note that admin export includes all users and can only be run once every 30 days.

Google Takeout Limitations

Google Takeout is not perfect. Be aware of these limitations:

Google Drive Migration

Method 1: Rclone (Recommended for Bulk Migration)

Rclone provides the most reliable method for migrating Google Drive content to Nextcloud. It handles Google's native format conversion automatically and supports large-scale transfers.

# Install rclone
curl https://rclone.org/install.sh | sudo bash

# Configure Google Drive remote
rclone config
# Choose "New remote" > name: "gdrive" > type: "Google Drive"
# Follow OAuth2 flow; for Workspace, use a service account for bulk access

# Configure Nextcloud remote
rclone config
# Choose "New remote" > name: "nextcloud" > type: "WebDAV"
# URL: https://cloud.example.com/remote.php/dav/files/USERNAME/
# Vendor: Nextcloud

Handling Google-Native File Formats

Rclone can automatically convert Google Docs, Sheets, and Slides during transfer. Configure the export format in your rclone remote settings:

# In rclone.conf, add to your Google Drive remote:
[gdrive]
type = drive
# ... other settings ...

# Export Google Docs as DOCX
--drive-export-formats docx,xlsx,pptx

# Or export as ODF (for Collabora Online)
--drive-export-formats odt,ods,odp

For organizations using Collabora Online as their document editor, ODF formats (ODT, ODS, ODP) are the native format and offer the best fidelity. For OnlyOffice, DOCX/XLSX/PPTX is the better choice. See our Collabora Online setup guide for configuration details.

Running the Migration

# Dry run first
rclone copy gdrive: nextcloud:/migrated-from-google/ \
  --drive-export-formats docx,xlsx,pptx \
  --dry-run \
  --progress

# Execute migration
rclone copy gdrive: nextcloud:/migrated-from-google/ \
  --drive-export-formats docx,xlsx,pptx \
  --transfers 4 \
  --checkers 8 \
  --progress \
  --log-file=/var/log/gdrive-migration.log \
  --retries 3 \
  --retries-sleep 10s

# For service account bulk migration (all users)
# Requires domain-wide delegation configured in Google Admin
rclone copy gdrive,shared_with_me: nextcloud:/migrated/ \
  --drive-impersonate user@company.com \
  --drive-export-formats docx,xlsx,pptx

Method 2: Google Takeout + Manual Upload

If rclone is not feasible, use Google Takeout to download ZIP archives, extract them locally, and upload to Nextcloud via the desktop client or web interface. This method is straightforward but does not scale well for organizations with many users or large data volumes.

Shared Drives Migration

Google Workspace Shared Drives (formerly Team Drives) require special handling because they are owned by the organization, not individual users. To migrate Shared Drives:

  1. Use rclone with the --drive-shared-with-me flag or configure access to specific Shared Drives.
  2. Map each Shared Drive to a Nextcloud Group Folder. This preserves the concept of team-owned storage that is not tied to an individual.
  3. Assign appropriate group permissions on the Nextcloud side before migrating data.
# List available Shared Drives
rclone lsd gdrive,shared_with_me:

# Copy a specific Shared Drive to a Group Folder path
rclone copy "gdrive,team_drive=TEAM_DRIVE_ID:" nextcloud:/Marketing/ \
  --drive-export-formats docx,xlsx,pptx \
  --progress

Preserving Folder Structure and Permissions

Google Drive's sharing model is per-file and per-folder, which is more granular than what most organizations need in Nextcloud. During migration, simplify where possible:

Gmail Export and Email Migration

Option 1: IMAP Migration (Recommended)

The most reliable way to migrate email is IMAP-to-IMAP sync using imapsync. This requires a destination mail server (Nextcloud is not a mail server, but Nextcloud Mail can connect to any IMAP server).

# Install imapsync
sudo apt-get install imapsync

# Migrate a single mailbox
imapsync \
  --host1 imap.gmail.com --port1 993 --ssl1 \
  --user1 user@company.com --password1 "app-password" \
  --host2 mail.newserver.com --port2 993 --ssl2 \
  --user2 user@company.com --password2 "new-password" \
  --gmail1 \
  --automap \
  --exclude "^\[Gmail\]/All Mail$" \
  --exclude "^\[Gmail\]/Spam$"

# The --gmail1 flag handles Gmail-specific label-to-folder mapping

Gmail uses labels instead of folders. A single email can have multiple labels, meaning it appears in multiple "folders." When migrating to a traditional IMAP server, imapsync handles this by copying the email to each corresponding folder. This may increase total mailbox size. Use --exclude flags to skip "All Mail" and other aggregate labels to avoid duplication.

Option 2: MBOX Import

If you used Google Takeout to export Gmail, you have MBOX files. These can be imported into most mail servers:

  1. For Dovecot-based mail servers, use doveadm import to import MBOX files directly.
  2. For other mail servers, convert MBOX to Maildir format using tools like mb2md, then import.
  3. Thunderbird can also import MBOX files and then sync them to your new IMAP server via drag-and-drop.

Option 3: Keep Gmail, Connect via Nextcloud Mail

The simplest email option is to keep Gmail running and connect it to Nextcloud Mail via IMAP. This gives users a unified interface without actually migrating email. This is a viable transitional strategy, but it means Google still has your email data.

Google Calendar Export to Nextcloud (CalDAV)

Method 1: ICS Export and Import

  1. In Google Calendar, go to Settings > Import & Export > Export. This downloads a ZIP file containing ICS files for each calendar.
  2. In Nextcloud Calendar, click the three-dot menu next to a calendar name and select "Import." Upload the ICS file.
  3. Repeat for each calendar.

Method 2: CalDAV Sync (For Ongoing Synchronization)

If you need a transition period where both calendars stay in sync, use a CalDAV bridge or sync tool. However, this is complex and usually not worth the effort for a one-time migration.

Handling Shared Calendars

Google Calendar shared calendars require coordination:

  1. The calendar owner exports the calendar.
  2. Import it into Nextcloud under the owner's account.
  3. Share the Nextcloud calendar with the same group of people using Nextcloud's calendar sharing feature.
  4. For room/resource calendars, create dedicated Nextcloud calendars and share them with the entire organization.

Recurring Event Considerations

Recurring events are the most fragile part of any calendar migration. Google Calendar uses RFC 5545 (iCalendar) for export, which Nextcloud also supports. However, watch for these edge cases:

Test a representative sample of complex recurring events before migrating all calendars.

Google Contacts Export to Nextcloud (CardDAV)

Export from Google

  1. Go to contacts.google.com.
  2. Click the gear icon > Export.
  3. Select "vCard (for iOS Contacts)" format. This produces a .vcf file compatible with CardDAV.
  4. Alternatively, export as Google CSV if you need to clean up data in a spreadsheet before importing.

Import into Nextcloud

  1. Open the Nextcloud Contacts app.
  2. Click the settings gear in the bottom-left sidebar.
  3. Click "Import contacts" and select the .vcf file.
  4. Contacts will be imported into the selected address book.

Contact Groups

Google Contacts groups (labels) are exported as part of the vCard data. Nextcloud Contacts supports contact groups, but the mapping is not always clean. After import, verify that groups transferred correctly and recreate any that did not.

Shared Contact Lists

Google Workspace's Directory (the organization-wide contact list) does not export through individual Takeout. Workspace admins can export the directory via the Admin SDK. Import this into a shared Nextcloud address book that is accessible to all users.

Google Keep Notes

Google Takeout exports Keep notes as HTML files. These can be imported into Nextcloud in a few ways:

# Batch convert Keep HTML notes to Markdown
for f in Keep/*.html; do
  pandoc "$f" -f html -t markdown -o "notes/$(basename "$f" .html).md"
done

Google Forms Data

Google Forms cannot be directly migrated to Nextcloud Forms. However, you can preserve the data:

  1. Export form responses to Google Sheets, then download as XLSX/CSV.
  2. Recreate active forms in Nextcloud Forms (the form structure must be rebuilt manually).
  3. For archived forms, keep the exported spreadsheet data in Nextcloud for reference.

Post-Migration Data Verification

After migrating each data category, verify the transfer:

Data TypeVerification MethodAcceptable Variance
Drive filesCompare file counts via rclone checkLess than 1% (empty Google Docs may not export)
EmailCompare mailbox message countsLess than 0.5% (drafts and spam may differ)
CalendarSpot-check 10 events including recurringAll events present; times correct
ContactsCompare contact countsExact match expected

Need Help with Your Migration?

MassiveGRID's managed Nextcloud hosting includes migration assistance, ensuring a smooth transition from your current platform.

Explore Managed Nextcloud Hosting

Google Workspace License Wind-Down

Maintain Google Workspace licenses for at least 30 days post-migration. During this period, set up email forwarding from Gmail to your new mail server (if applicable), and verify that all data has been successfully transferred. Downgrade to a lower-tier plan if possible to reduce costs during the overlap period.

What Comes Next

Exporting your data is the technical half of the migration. The human half, getting your team comfortable with Nextcloud, is equally important. Our team onboarding playbook for Nextcloud provides a structured approach to training users at every skill level, from basic file operations to advanced collaboration features. The playbook includes feature mapping tables that show users exactly where to find the Nextcloud equivalent of every Google Workspace tool they are accustomed to using.

For the broader context of this migration, including the strategic reasoning behind moving from Google to a self-hosted platform, refer back to the complete guide to replacing Google and Microsoft with Nextcloud.