All sorts of issues might be causing the backup error. I was facing the same problem with an iPhone 5 also running iOS 8.4. After reading the Apple forums, the following worked for me and I've solved it!
1. Plug the iPhone to USB cable
2. Turn off "Backup to iCloud" in iTunes by choosing "Backup to this computer"
3. Sync
4. Go to iCloud and delete all previous backups (additional instructions bellow)
5. Turn on the "Backup to iCloud" option in iTunes again
6. On the iPhone click Backup to iCloud
! Important: Depending on how much data you need to backup, this might take some long time, be patient and wait.
Step 4. - additional instructions
Depending on your iOS version you might have 2 iCloud Backup locations, make sure you delete the previous backups in both locations and then do a manual backup.
iCloud location 1:
Settings > iCloud > Storage and backup > Manage storage
iCloud location 2:
Settings > General > Usage > Manage storage
Weirdly, some users have reported that the following trick might solve the backup error. You might want to give it a try after following the instructions above.
- on iPhone, go to Settings > iCloud > Storage and backup
- Click Manage storage on the iPhone (or whichever device is having issues)
- Under Backup options, uncheck "Camera roll"
In iTunes try to manually "Backup to this computer" and see if that works. If it works, you can check the "Camera roll" option again on your device and the backup should still work! Perhaps this little trick can solve the issue.
/---------------*--------------/
If the steps and instructions above did not help, the following alternatives perhaps will guide you in the right direction:
-- Before anything else --
- Make a Backup of your iTunes Library
- Make a Backup of your device's Backup folder
(The iPhone backup is stored (assuming Mac) under:
/Users/Myself/Library/Application Support/MobileSync/
--> replace Myself with your actual Mac user name
How to find the iPhone Backup folder (assuming Mac)?
Go into iTunes preferences under Devices tab, ctrl + click one of the backups and select show in finder.
or
Open a new finder window and in the menu bar click Go to Folder and type in
/Users/Myself/Library/Application Support/MobileSync/
--> replace Myself with your actual Mac user name
Both ways will open up the device's Backup folder in finder, make a copy of all the folders you find within the Backup folder to the desktop.
If all necessary backups are made, you may now Completely Uninstall iTunes. The ordinary uninstall process will not remove iTunes library nor the devices (iPhone) Backup folder (which you should already have made the backup as mentioned in the first steps as a precaution).
Delete (Move to trash) all Backup folders you have located under:
/Users/Myself/Library/Application Support/MobileSync/
(Clean the trash)
Restart the Mac and download the latest iTunes version, install it, restart the Mac again.
Connect your device in iTunes and try to make a manual Backup by choosing "Backup to this computer" option
Sync
If the Backup process turns to be successful, you may now have newly backup data within your device's Backup folder under:
/Users/Myself/Library/Application Support/MobileSync/
From this point you could proceed on setting up the iCloud Backup again under iTunes.
If all those steps failed, continue to nail down the possible cases why this error might be occurring etc. You might also want to try a different usb cable if available.
Good Luck!