[SalesForce] How we can export data with apex data loader using record ids only

We have identified 1500 records were duplicate in one of our object,received these recordIDs from other replication database.Now I want to delete them from Salesforce,before that want to take backup of all of the records data using data loader.I'm using below query to get the data,but getting error message,

Select id,Name,ETL_ID from SesameAccount__c where ID IN('a03i000000DrCDV','a03i000000DrCFZ',……..)

I've only record IDs handy,how can I get the data export using IDs.?Please help me here.

Best Answer

Someone may have a better solution but here is what I have done before:

  1. Create a custom field on the object say Export__c
  2. Use the original file with the IDs to populate the Export__c field to true
  3. Export the records with the Export__c field as true
  4. Update / do what is needed to those records
  5. Delete the Export__c field (if you feel the need). If keeping it set it to false when you update the records is step 4