Task #3500
MNDeployment #2564: ORNL DAAC
Archiving ORNL DAAC pids
100%
Description
This script -should- might work for archiving pids. Run it as root
If it does not run correctly, then it would be easy to rewrite this up using d1-client-java
Dave, reassign once pids are added in to whom every you choose.
Add in each PID on a newline between EOF tags, run on cn-ucsb-1 or if another server, change script to point to appropriate certificate
#!/bin/bash
2012-07-13¶
Script to archive old PIDs from DAAC.¶
Need to run this as a user with access to the certificiate¶
curl -E "/etc/dataone/client/private/urn:node:CNUNM1.pem" -X PUT "https://cn.dataone.org/cn/v1/archive/somerecordpid"¶
HOST="cn-ucsb-1.dataone.org"
CERT="/etc/dataone/client/private/urn:node:CNUCSB1.pem"
PIDS=$(cat << EOF
PIDX
PIDY
PIDZ
EOF)
for PID in ${PIDS}; do
echo ${PID};
curl -E "${CERT}" -X PUT "https://${HOST}/cn/v1/archive/${PID}"
done
History
#1 Updated by Skye Roseboom almost 12 years ago
- Target version deleted (
2013.2-Block.1.1)
#2 Updated by Skye Roseboom almost 12 years ago
- Target version deleted (
2013.2-Block.1.1) - Parent task set to #3568
#3 Updated by Skye Roseboom over 11 years ago
- Target version set to Operational
#4 Updated by Skye Roseboom over 11 years ago
- Project changed from Infrastructure to Member Nodes
- Category deleted (
Support Operations) - Parent task changed from #3568 to #2564
#5 Updated by Skye Roseboom over 11 years ago
Production CN contains un-archived system metadata for record*.xml metadata records which do not exist on the ORNL DAAC.
579 objects.
Ex:
https://cn-ucsb-1.dataone.org/cn/v1/meta/record847.xml
http://mercury-ops2.ornl.gov/ornldaac/mn/v1/meta/record847.xml
#6 Updated by Skye Roseboom over 11 years ago
- Assignee changed from Dave Vieglais to Ranjeet Devarakonda
Spoke with Chris Jones and Ranjeet today about resolving these issues:
We are going to attempt a different solution than is presented above. This issue is similar to issue on ORNL Daac as well - with some content that is not resolvable any longer. So we are going to try the same solution:
USGS CSAS MN will update the system metadata to set the 'archive' flag and the 'dateSysMetadataModified'. This will trigger the CN to re-sync the system metadata with the archive information updated. This will trigger the search index to remove these records from the search index.
#7 Updated by Skye Roseboom over 11 years ago
Hi Ranjeet - If these documents have been deleted from ORNL DAAC, we will need a list of pids to 'archive' for ornl daac.
Can you confirm that all 579 objects identified by this query should be archived:
#8 Updated by Ranjeet Devarakonda over 11 years ago
Hi Skye - Yes, all identifiers that start with "record*" should be set to archived. Your list looks correct.
#9 Updated by Skye Roseboom over 11 years ago
- Assignee changed from Ranjeet Devarakonda to Chris Jones
Chris- Ranjeet has confirmed the list of pids to be archived. I believe we spoke about using your system metadata update script to archive these documents.
This solr query will return a list of pids that are from ORNL Daac and have a pid that begins with 'record'*.
579 total docs
#10 Updated by Chris Jones over 11 years ago
- Status changed from New to Closed
- translation missing: en.field_remaining_hours set to 0.0
I've changed the system metadata on the CNs for the record* pids listed above in the Solr query to 'archived', so they should no longer show up in the ONEMercury interface search. I'll confirm this with Skye.
#11 Updated by Chris Jones over 11 years ago
- Status changed from Closed to In Progress
- Estimated time set to 0.00
Re-opening this issue since we have 3 more pids to archive that were removed from the MN, but still remain on the CN:
scimeta_415.xml, scimeta_650.xml, scimeta_704.xml
#12 Updated by Chris Jones over 11 years ago
- Status changed from In Progress to Closed
I've archived the last three pids above.