Duplicate asset (hostname) on Uptycs platform could be a result of particular asset being in rotation or being used a a loaner laptop in which case, uuid of the asset remains the same and the asset is recorded under different hostnames.
Following procedure outlines the process to identify and delete duplicate records (same hostname, different uuids).
Prerequisite tools
iusql
urestapi
Procedure
Download api key from Uptycs UI
Identify and verify duplicate assets
It is always safe to identify duplicate assets and verify assetIds that are being deleted.
Attached script, duplicate_asset_details.sh can be used to list all duplicate assets.
Usage : ./duplicate_asset_details.sh <api_key_file>
e.g. ./duplicate_asset_details.sh my_api_key_file.json
Delete duplicate assets
Attached script, delete_duplicate_assets.sh can be used to confirm uids of assets (in conjunction with above list) and delete duplicate assets. delete_duplicate_assets.sh deletes assets with duplicate host_names and last_activity_at lower than the highest record.
Usage : delete_duplicate_assets.sh <api_key_file>
e.g. : ./delete_duplicate_assets.sh my_api_key_file.json
Related Articles