function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sridharbsridharb 

Migrating Attachments

Hi

I hope some one been through my situtation. Currently migrating a once salesforce on to one other salesforce instance. When Migrating Attachments I am facing a weird situation where I am Unable to find the work around. Could any one please help me..Any suggestions welcomed.

Scenario
I am migrating 7000 attachments of object 'Case', Obiviously any tool we use we have to pull down the files to local source and refer the path of the file while exporting to salesforce in 'Body' Field. And dealing with all attachments at time causes memory and time consuming never what error comes. So I am doing the migration of case object related Attchments in increamentally,  based on createddate date range of 3 months.

The problem I am facing is, Many times many files from differenct cases having same file name, So when I import a set of attachments on Windows platoform, It is replacing if any other case has simillar infact same name. But relistically both are different files belongs to different cases. Due to this Attachments record count most of the higher than the file count in my Target Folder on Windows.

In a Example. lets say 2 cases, case A and case B has 2 different attchments but same name like A1.pdf on Case A, A1.pdf on Case 2.  My generated Csv file containing 2 records and but target folder at Windows is containing only one file as Windows treating other duplicate and jsut replacing last file.

It is becoming hilgly Impossible to trace out when 1000 + files are there even shorten the criteria to 1 month. Does anyone come across of similar problem from any of their migration jobs. I am so greatful to any suggestions indeed please 

I am happy to describe more clearly if anything on my problem is not clear. 


Regards
S
Best Answer chosen by sridharb
sridharbsridharb
For any one I would highly recommand Jitter bit cloud data loader for Attachment migrations. We could acheive withing their 1 month free trail.

 

All Answers

Prateek Singh SengarPrateek Singh Sengar
Hi Shridhar,
What you need to do is rename the files before you are exporting them. You can use the following naming convention SFDCID+FileName to make the file name unqiue. This way you can ensure that you dont override the files.
Please follow the below steps

1) Export the id and name of files you want to export using workbench or data loader
Select Id, ParentId, Name from Attachment where YOUR_CRITERIA

2) In the export file create a new column called updatedName, use SFDCID+FileName to populate this column
3) Update the attachment records to rename the files

Perform the normal process of exporting the data and importing them to other org. Now since you have unique file names you should not face the issue you mentioned.

Once the upload is done, prepare another file strip the first 18 character of the file name and update it back to revert back to the orginal name. Hope this helps.

You can also use a tool called fielexporter to help you with some of these manual activities. for more details on using the tool please visit
http://blog.westmonroepartners.com/how-to-migrate-attachments-from-one-salesforce-com-org-to-another/

Hope this helps.
UC InnovationUC Innovation
Hi Sridhar,

I understand how painful migrating attachments can be. You can download the files, rename them and use dataloader... but honestly there is a much easier and painless way. Try using this tool:

http://cloudexplorer.ucinnovation.com/

There's no sign up required, you just log into the org you want to migrate from, and the org you want to migrate to. Then you just need to drag and drop attachments from the source org to the target org, and all the relatioships will be maintained. There's no need to rename and download any files.

I would read the user's guide (http://cloudexplorer.ucinnovation.com/docs/cloud_explorer_users_guide.pdf), but if you need further assistance I'd be happy to walk you through the process. This is our company's product, we designed it to be an easy to use, painless method to do data migration by doing all the relationship mapping for the user automatically.

Let me know if this helps!
sridharbsridharb

Hi Prateek,

Firstly thanks sparing time.  It is highly difficult identify same filename un less I maually each and every single object. When eimport Attachments of 100 records to local drive at Path,  Lets say total 150 attachments are there for 100 records and among 150 Attachments let say 3 files has same names but content and records are same. In this case after import process If I check the count of files I would have only 148 (147+1) because since 3 file names are with the same name and file extension window assumes as it one and replaces. But the CSV being generated will have 150 records of attachments. so If I export the same CSV Target will have 150 Attachments but 3 file will be same.

Dont know how to handle this. 
 

S

sridharbsridharb
Hi UC Innovation,

Thanks for the time sparing firstly. And looks your tool promising. If there is no registration required that will be great I will take a look and if that can help I will be so happy to use and recommend.

I will keep you posted Once I give a try.

Thanks
S
sridharbsridharb
For any one I would highly recommand Jitter bit cloud data loader for Attachment migrations. We could acheive withing their 1 month free trail.

 
This was selected as the best answer
Oleksandra Oleksandra 7Oleksandra Oleksandra 7
Hi,
It is believed that you've already migrated desired data so my suggestion is for those users who had not yet.
You may take advantage of Trujay to migrate as many Attachments as needed. 
Schedule a call with experts to get useful advice, or launch free sample migration (https://app.data2crm.com/wizard) to see if the service work for you properly.