How to Retrieve Old Text Messages Before Syncing on an iPhone

by David Wayne

    Syncing your iPhone automatically creates a backup of your settings, messages and other system data, and your text messages are stored as a SQLite database file. Several programs extract text messages from an iPhone, and installing the SQLite shell on your computer enables you to extract them yourself for free. Text messages remain on your iPhone until you delete them and perform a sync with iTunes, and deleted texts don't appear in the backup file created when you sync.

    Transfer

    Step 1

    Download and install an iPhone SMS-transferring program, such as Tansee iPhone Transfer SMS, DiskAid or Aiseesoft iPhone SMS Transfer (see Resources for links). Click “Finish” at the end of setup to launch the program.

    Step 2

    Connect your iPhone to your computer and select it in the Device section of the window. Choose a “Contact” from the list to view all text messages exchanged with this person and click “Copy” to save these messages. Alternatively, click “Copy” while viewing your Contacts list to transfer all messages on your iPhone.

    Step 3

    Choose “Save as Text File” and click “Browse” to select a location for the text file. Enter a name for the file and click “OK.” In the File Transfer window, click “OK” to save the file.

    Shell

    Step 1

    Connect your iPhone to your computer, launch iTunes and press “Ctrl-B” to show the menu bar if it's hidden. Click “File,” point the cursor to “Devices” and choose “Back Up.” Skip this step if you have synced or backed up your iPhone and already have a backup file in your AppData directory.

    Step 2

    Visit the SQLite website to download the most recent precompiled SQLite 3 Shell binary file (see Resources for link). Right-click the ZIP file and choose “Extract All.” Select the extracted folder and press “F2” to rename it “sqlite3.” Drag this folder to “Local Disk (C:)” and click “Continue” when prompted.

    Step 3

    Press the “Windows” key, type “%appdata%” (without quotes here and throughout) and press “Enter” to open a folder containing iTunes application data. Navigate to “Apple Computer\MobileSync\Backup” and enter the directory with the most recent date in the Date Modified section.

    Step 4

    Select the file “3d0d7e5fb2ce288813306e4d4636395e047a3d28” and press “Ctrl-C” to copy it. Navigate to the “sqlite3” folder in your root directory and press “Ctrl-V” to paste the SMS database file there. Click the file, press “F2” and rename it “sms.”

    Step 5

    Press the “Windows” key, type “cmd” and press “Enter” to open a Command Prompt window. Enter the following commands in the console, pressing “Enter” after each line:
    cd c:\sqlite3 sqlite3.exe sms .output iphonesms.txt select * from message; .exit
    Your messages appear in the file “iphonesms.txt” in the “sqlite3” folder.

    Tip

    • Most iPhone SMS-transferring programs offer a free trial, although they may limit the number of messages you transfer. These programs can produce a clearer text file than extracting the messages with the SQLite 3 Shell.

    About the Author

    David Wayne has been writing since 2010, with technology columns appearing in several regional newspapers in Texas. Wayne graduated from the University of Houston in 2005, earning a Bachelor of Arts in communications.