Skip to content

Instantly share code, notes, and snippets.

@alastori
Last active February 9, 2025 00:23
Show Gist options
  • Save alastori/8cc12b4e008d6de434d2dcb5c4d8605d to your computer and use it in GitHub Desktop.
Save alastori/8cc12b4e008d6de434d2dcb5c4d8605d to your computer and use it in GitHub Desktop.
How to transfer Nintendo Switch SD Card data using macOS

How to Transfer Nintendo Switch SD Card Data (macOS Guide)

This guide explains how to migrate a Nintendo Switch SD card to a larger SD card on macOS, ensuring data integrity while avoiding hidden macOS metadata files.

Summary of Steps

Step Action
1 Create a read-only .dmg backup of the old SD card using Disk Utility.
2 Format the new SD card in the Nintendo Switch.
3 Mount the .dmg backup and use rsync to transfer data.
4 Verify file integrity and eject the new SD card.
5 Insert the new SD card into the Switch and confirm data is intact.
6 Optionally delete the backup image.

Prerequisites

  • A Mac with Disk Utility and Terminal.
  • A Nintendo Switch SD card reader (if needed).
  • Enough free disk space on your Desktop or an external drive to store the backup.

Check Available Disk Space

Since the .dmg file will be saved on the Desktop in our examples, confirm you have enough space before proceeding. If you plan to save the file on an external drive, replace ~/Desktop with the correct path.

  1. Open Terminal (Cmd + Space, type Terminal, and press Enter).

  2. Run the following command to check available disk space on the Desktop:

    df -h ~/Desktop

    If using an external drive, check its available space by replacing ~/Desktop with your drive’s mount point. For example:

    df -h /Volumes/YourExternalDriveName
  3. Look at the Avail column. Ensure there is more available space than the size of your SD card. For example:

    Filesystem      Size    Used   Avail Capacity Mounted on
    /dev/disk3s5   926Gi   573Gi   323Gi    64%   /System/Volumes/Data

    If your old SD card is 256GB, you should have at least 256GB free.

Step 1: Create a Read-Only Backup of the Old SD Card

  1. Power off the Switch and remove the old smaller SD card.
  2. Make sure to enable the write lock on your SD card to prevent any accidental writing.
  3. Insert the old SD card into your Mac.
  4. Open Disk Utility (Cmd + Space, type Disk Utility, and press Enter).
  5. Select the SD card from the left panel (not just a partition, select the entire card).
  6. Create a backup disk image:
    • Click FileNew ImageImage from [SD card name] (usually "Untitled").
    • Set options:
      • Save As: enter a name such as nintendo-switch-backup.dmg (save to Desktop or an external drive).
      • Format: Read-only.
      • Encryption: None.
    • Click Save and wait for the process to complete.
  7. Eject the old SD card (Cmd + E or right-click → Eject).

At this point, you have a read-only backup of the old SD card.

Step 2: Format the New SD Card Using the Nintendo Switch

  1. Insert the new SD card into the Nintendo Switch and power it on.
  2. Go to System SettingsSystemFormatting Options.
  3. Select "Format microSD Card" and confirm.
  4. Power off the Switch and remove the SD card.

Now, the new SD card is formatted for Switch compatibility.

Step 3: Restore Data from the Backup Image to the New SD Card

  1. Open a Terminal and mount the .dmg backup image (assuming it is in the Desktop folder):

    hdiutil attach ~/Desktop/nintendo-switch-backup.dmg

    The image will mount in /Volumes/ usually as Untitled (if the old SD card was formatted via Nintendo Switch). You should see an output like:

    expected   CRC32 $9D8A7212
    /dev/disk5                 /Volumes/Untitled
    
  2. Insert the new SD card into your Mac.

  3. Prevent macOS from creating hidden files on the new SD card:

    sudo mdutil -i off "/Volumes/Untitled 1"
    sudo mdutil -E "/Volumes/Untitled 1"
    sudo touch "/Volumes/Untitled 1/.metadata_never_index"
    sudo touch "/Volumes/Untitled 1/.fseventsd/no_log"
    defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
    defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

    What this does:

    • mdutil -i off "/Volumes/Untitled 1" → Stops Spotlight from indexing the SD card.
    • mdutil -E "/Volumes/Untitled 1" → Deletes any existing Spotlight metadata.
    • touch "/Volumes/Untitled 1/.metadata_never_index" → Ensures Spotlight never indexes the SD card again.
    • touch "/Volumes/Untitled 1/.fseventsd/no_log" → Prevents macOS from logging filesystem events on this volume
    • defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true / DSDontWriteUSBStores → Prevents creation of .DS_Store files on USB/external volumes for current session
  4. Check the list of mounted volumes:

    ls /Volumes

    You should see:

    Macintosh HD
    Untitled
    Untitled 1
    • Untitled → Mounted backup (old SD card data).
    • Untitled 1 → New SD card.
  5. Copy the data using rsync while excluding macOS metadata:

    rsync -avh --progress --exclude=".*" --exclude=".*/" "/Volumes/Untitled/" "/Volumes/Untitled 1/"
    • --exclude=".*" ensures that macOS hidden files (.DS_Store, ._*) are not copied.

Step 4: Verify the Data on the New SD Card

  1. Check if all files were copied successfully to the new SD card using rsync dry-run option:

    rsync -rvh --dry-run --progress --exclude=".*" --exclude=".*/" "/Volumes/Untitled/" "/Volumes/Untitled 1/"
    • If no files are listed for transfer in the output (only summary statistics), the contents are identical
  2. Eject the SD card properly:

    diskutil eject "/Volumes/Untitled 1"

Step 5: Test the New SD Card in the Nintendo Switch

  1. Insert the new SD card into the Nintendo Switch.
  2. Turn on the Switch and check:
    • Games and save data should be intact.
    • Screenshots and other saved data should appear correctly.
    • Storage size should reflect the new capacity under:
      • System SettingsData Management.

Step 6 (Optional): Unmount and Delete the Backup Image

  1. Eject the mounted backup volume:

    hdiutil detach "/Volumes/Untitled"
  2. Move the .dmg backup file to Trash:

    mv ~/Desktop/nintendo-switch-backup.dmg ~/.Trash/
  3. Return the system to its default behavior for creating .DS_Store files:

defaults delete com.apple.desktopservices DSDontWriteUSBStores
defaults delete com.apple.desktopservices DSDontWriteNetworkStores

Why This Method Works Best

  • No risk of corruption due to a read-only .dmg backup.
  • Uses Nintendo-approved formatting for best compatibility.
  • rsync prevents unwanted macOS metadata files.
  • Provides a rollback option in case of issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment