Commit 31bfd2e6 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add delete scripts for record sets and institutions.

parent 13a5c632
# requires two tunnels to work properly
# ssh -L 8080:dd-fed2:8080 swissbib@dd-fed2.ub.unibas.ch
# ssh -L 8081:mb-es1:8080 swissbib@mb-es1.memobase.unibas.ch
INSTITUTION_ID=""
INSTITUTION_INDEX="institutions-v6"
# This password can be found in the memobase keypass database.
FEDORA_PASSWORD=""
# Deletes the institution record from fedora. Will only work if all record sets which reference this institution are
# deleted beforehand
curl -u"fedoraAdmin:$FEDORA_PASSWORD" -XDELETE http://localhost:8080/frcrep/rest/institution/$INSTITUTION_ID
# Deletes the tombstone of the institution. This stores the fact that this identifier was once used but then deleted.
# Only delete this if you wish to free up the slot or do not want to keep a log of the deletion.
#curl -u"fedoraAdmin:$FEDORA_PASSWORD" -XDELETE http://localhost:8080/frcrep/rest/institution/$INSTITUTION_ID/fcr:tombstone
curl -XDELETE "localhost:8081/$INSTITUTION_INDEX/$INSTITUTION_ID"
\ No newline at end of file
# requires two tunnels to work properly
# ssh -L 8080:dd-fed2:8080 swissbib@dd-fed2.ub.unibas.ch
# ssh -L 8081:mb-es1:8080 swissbib@mb-es1.memobase.unibas.ch
RECORD_SET_ID=""
RECORD_SET_INDEX="record-sets-v7"
PASSWORD=""
# Deletes the institution record from fedora. This will only work if all the records which reference this record set
# are deleted before.
curl -u"fedoraAdmin:$PASSWORD" -XDELETE http://localhost:8080/frcrep/rest/recordSet/RECORD_SET_ID
# Deletes the tombstone of the record set. This stores the fact that this identifier was once used but then deleted.
# Only delete this if you wish to free up the slot or do not want to keep a log of the deletion.
#curl -u"fedoraAdmin:$PASSWORD" -XDELETE http://localhost:8080/frcrep/rest/recordSet/RECORD_SET_ID/fcr:tombstone
curl -XDELETE "localhost:8081/$RECORD_SET_INDEX/$RECORD_SET_ID"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment