Skip to main content

Notifications

Announcements

No record found.

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

  • Jose Fleitas Profile Picture
    Jose Fleitas 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

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,050 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
    Jose Fleitas 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
    Adrian Begovich Profile Picture
    Adrian Begovich 1,014 Super User 2024 Season 2 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.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans