Copy only setupdata but not transactions while copying company

while copying the company I want to copy only setupdata like(customers, vendors, items, routings, etc.) and setups in their system but want to eliminate ALL transactional data. How do you handle this situation?

Also is there any option that we can the code behind copy data procedure?
image