If you enter DFU mode to unlock iPhone, your data will lost, if you have backup, you need restore from backup.
Apart from the DFU mode can unlock iPhone, you can use your iTunes or iCloud to unlock iPhone, but same as DFU mode, you will loss all data in iPhone, but you can restore from backup after that you have unlocked iPhone.
If you don’t want loss data and your iPhone system is iOS 8 or precious, you can use Siri to [https://www.eelphone.com/unlock/how-to-unlock-iphone-without-password.html|unlock iPhone without password] for free. This method is suitable for only a few iPhone.
Or you can use Eelphone iPhone Unlock to unlock your iPhone in steps.