In rare cases it can be possible to have multiple files with the same ID in the system.
Because an ID should be unique for each file, this issue needs to be resolved. This can be done by moving duplicate filesto a dedicated folder and assigning a unique ID to each file, or by removing the duplicate files from the system.
Definition of 'duplicate'
The distinction between the original file and any duplicate files is made based on the assetModified field:
- The original file is considered to be the file with most recent assetModifed value.
- Duplicate files are all other files with the same ID as the file that is considered to be the original file.
Resolving files with duplicate IDs
The process involves performing a scan to see if any files with duplicate IDs exist, followed by separate steps to move these files to a dedicated folder and assigning unique IDs, or to remove them from the system.
Note: The action of moving files to a different folder and assigning unique IDs is not supported when the files are stored on a S3 storage engine on Amazon AWS.
Scanning for files with duplicate IDs
This will scan all indexes and shows an overview of all files with same ID. No action on the files themselves is taken.
Use the following POST API call:
<Assets Server URL>/services/system/asset/cleanup?dryRun=true
Moving duplicate files and assigning unique IDs
Note: This action is not supported when the files are stored on a S3 storage engine on Amazon AWS.
This will move all files with a duplicate ID to the following folder and assign a unique ID to each file:
/Rescued/duplicates/<assetPath>
Use the following POST API call:
<Assets Server URL>/services/system/asset/cleanup?dryRun=false
Removing duplicate files
This will remove all duplicate files from the system.
Use the following POST API call:
<Assets Server URL>/services/system/asset/cleanup?dryRun=false&rescueDuplicates=false
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.