1 Samuel 30:18

And David recovered all that the Amalekites had carried away: and David rescued his two wives.

David recovered all that the Amalekites had carried away, with every captive and all the goods brought back without loss. That complete recovery included the rescue of his two wives. Beyond what had been taken from Ziklag, the victory also yielded additional spoil that the Amalekites had taken from the Philistines.

The recovery came through pursuit of the enemy with the men who were able to continue onward. It came through trust in the Lord and obedience to the instruction given to pursue. In this way the apparent disaster at Ziklag was turned into gain rather than loss, showing that a crisis seeming to contradict God's providence did not prevent God from bringing recovery.