How can I restore a deleted customer account?
You can't restore a customer account with a status I (Inactive).
However, you can export inactive and merged accounts, contacts, households, organizations, and persons using export management. You don't need to rely on data model queries to fetch the deleted or merged records.
To export inactive records, you need to explicitly add the condition to the criteria, or else only the active records will be exported. For example, I for Inactive and M for merged.All associated child records (active or inactive) will be exported irrespective of their status, if no criteria is added.
For more information see How you manage export objects?