-
Notifications
You must be signed in to change notification settings - Fork 2
Deleting a Moab from PresCat
Naomi Dushay edited this page Dec 16, 2022
·
4 revisions
note 2022-12-16: Andrew is working on a "real procedure"; there is also a similar doc on Consul.
There isn't an easy way to do this, by design. Deletions are rare.
mg599hw5271 version 4 parts 1
mg/599/hw/5271/mg599hw5271.v0004.zip CURRENT
mg599hw5271 version 3 parts 1
mg/599/hw/5271/mg599hw5271.v0003.zip CURRENT
mg599hw5271 version 2 parts 8
mg/599/hw/5271/mg599hw5271.v0002.zip CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z07 CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z06 CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z05 CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z04 CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z03 CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z02 CURRENT
mg/599/hw/5271/mg599hw5271.v0002.z01 CURRENT
mg599hw5271 version 1 parts 1
mg/599/hw/5271/mg599hw5271.v0001.zip CURRENT
...and delete them from archive endpoints using other tools. (cli, gui, whatever works). Be vary careful and document what you deleted.
This is left as an exercise for the reader.
# NOTE, tested a bit indirectly: @jmartin-sul wrote this snippet, and @andrewjbtw used it and said it worked
#
# zip parts destroyed first because they have FK pointing back to parent ZMV.
# then ZMVs can be done. similary, complete moabs first because they have FK
# back to parent preserved object. then finally, preserved object.
po = PreservedObject.find_by!(druid: 'mg599hw5271')
po.zipped_moab_versions.find_each do |zmv|
zmv.zip_parts.destroy_all
end
po.zipped_moab_versions.destroy_all
po.complete_moabs.destroy_all
po.destroy
po.save! # maybe unnecessary? might even throw an error? :shrug:
Sometimes we delete content by re-accessioning the object at version 1 with a stub druid. If this is the case here, re-catalog the druid.
- Replication errors
- Validate moab step fails during preservationIngestWF
- ZipmakerJob failures
- Moab Audit Failures
- Ceph Errors
- Job queues
- Deposit bag was missing
- ActiveRecord and Replication intro
- 2018 Work Cycle Documentation
- Fixing a stuck Moab
- Adding a new cloud provider
- Audits (how to run as needed)
- Extracting segmented zipfiles
- AWS credentials, S3 configuration
- Zip Creation
- Storage Migration Additional Information
- Useful ActiveRecord queries
- IO against Ceph backed preservation storage is hanging indefinitely (steps to address IO problems, and follow on cleanup)