web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Copy from Prod Instances

(0) ShareShare
ReportReport
Posted on by 835

Hello,

Currently, we have a lot of Sandbox instances for development purposes, and we are trying to lower storage capacity in our lower orgs. The issue is that we need some data to come down from production for development purposes, but we probably only need about a year worth of data. The two only option is a full copy or a copy with customization and schema. Is anyone familiar with a tool we can use after a copy? Currently, we onpen ticket to truncate the audit log table and delete any emails with attachments to free up space in lower orgs.

Thanks

Jose F

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at
    RE: Copy from Prod Instances

    Hi Jose Fleitas,

    This article explains how to copy an environment. If you want to delete data after finishing the copy, you can achieve this with the bulk deletion feature.

  • Jose Fleitas Profile Picture
    835 on at
    RE: Copy from Prod Instances

    Hello,

    I already know how to copy an environment, and I am familiar with bulk delete. IWe have a lot of custom entities and data. This is to much work to run bulk delete jobs.  Also, I wasn't asking on how to do a copy.

    Thanks

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Copy from Prod Instances

    Hi 

    There are tools you can use to copy data or delete data after you did a full copy of instance. Most of the tools will work fine if you do not have many tables (entities) and if you do not have loads of relationships.

    You could do a "Copy Schema Only" and the use the configuration migration tool to migrate or copy data over from Prod to Dev. In the configuration migration tool, you can now filter records using FetchXML so may be you could have your date filter in there.

    https://powerobjects.com/2018/08/27/microsoft-dynamics-365-crm-configuration-migration-tool/

    https://docs.microsoft.com/en-us/power-platform/admin/manage-configuration-data

    There is one other option I normally follow is to write linqpad script in c# that loops though list of entities and copy the data (obviously you will have to created the records in order). The script based approach is very flexible as you can have any filter or condition you want.

    If you go with Full Copy approach, then you can delete audit logs and attachments to reduce the size and then use Bulk Deletion job or third party tool like XrmToolBox to delete the unnecessary data. 

    pastedimage1605912362081v2.png

    pastedimage1605912350024v1.png

    This XrmToolBox plugin allows you to select a view or paste FetchXML so filtering and deleting is fairly straightforward.  The difference between OOB bulk delete job and this tool is that this tool does instant deletion where as the system job is async will take longer.

  • Jose Fleitas Profile Picture
    835 on at
    RE: Copy from Prod Instances

    Hello Kokulan,

    Our environment has a lot of entities and is heavily customized. I  am not familiar with the migration tool. Does it migrate over the actual data? I am aware of a copy with customization and schema, but the question is how do I delete all data in the system older than say a year.  For bulk delete, I am familiar with the tools and xrmtoolbox. Our audit logs are about 200 GB in production since we use this data past year audit, so this is not a simple task. Microsoft truncates the table for us which takes about 15 minutes. Attachments; I delete all attachments in lower orgs. I am looking at an attachment extractor tool in app source to store attachment in cheaper storage.

    appsource.microsoft.com/.../microsoft_labs.96257e65-dbbe-43db-b775-77cf1609530c

    appsource.microsoft.com/.../microsoft_labs.dataarchival

    Thanks,

    Jose

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 183 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 121

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 61 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans