Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Recover a bucket by recreating the object using the recreatecid query argument if a domain or bucket (context object) is deleted in the storage cluster by mistake.
Note |
---|
CautionAny mistakes in using these commands can cause serious problems. Consult DataCore Support for assistance with these operations. Do not attempt to use recreatecid to move bucket contents across domains within the cluster. |
Info |
---|
TipIf the grace period (health.recursiveDeleteDelay) following the recursive deletion of a domain or bucket, use the special methods below to restore it without data loss. If the deletion had no grace period (recursive=now), only some of the data is lost to reclamation, depending on how much time has passed since the delete. |
...
A new domain cannot be created with the identical name to recover a domain as it is mapped to a new UUID; Castor-System-Alias on the domain stream. Create a new domain from the command line and use a query argument to apply the previous domain's UUID.
Orphaned bucketsBuckets - The buckets in the deleted domain reference are not by name but by UUID (Castor-System-CID). These buckets are not accessible until a new domain is created which uses the original UUID.
To recover the domain:
Locate and record the log message related to the missing domain.
Code Block language bash Domain 'example.com' (uuid=a2fc4bb0fc31bbc73a088783aef8ea73) has been deleted ...
Copy the UUID listed within the log message to recreate the missing domain.
Code Block language bash a2fc4bb0fc31bbc73a088783aef8ea73
Create a new domain with a POST that references the deleted domain's UUID in the recreatecid query argument:
Code Block language bash curl -i -X POST --location-trusted --post301 --user 'admin:datacore' --data-binary '' \ -H 'Content-type: application/castorcontext' \ 'http://10.160.132.33?domain=unwanted-chs-eu-domain1&admin&recreatecid=04648a25e90c0b036435caa6d03295be'
If the domain and its content are not required, delete them. This is optional.
Code Block language bash curl -i --location-trusted -u admin:datacore -X DELETE 'http://10.160.132.33/04648a25e90c0b036435caa6d03295be?admin&recursive'
Recovering a Deleted Bucket
The named objects within the bucket are inaccessible until the bucket is recovered after deleting a bucket.
Note |
---|
WarningDo not use |
To recover the bucket:
Locate and record a critical log message related to the missing bucket, resulting from a named object within it being inaccessible.
Code Block language bash Bucket 'mybucket' (uuid=75edd708dc250137849bbf590458d401) in domain 'example.com' has been deleted with orphan content. Consider recreating.
Copy the UUID listed within the log message to recreate the missing bucket.
Code Block language bash 75edd708dc250137849bbf590458d401
Create a new bucket with a POST that references the deleted bucket's UUID in the recreatecid query argument:
Code Block language bash $ curl -i -X POST --location-trusted --post301 --anyauth --user 'admin:password' --data-binary '' \ -H 'Content-type: application/castorcontext' \ -H "Policy-*: {if needed}" \ 'http://{host}/mybucket?domain=example.com&admin&recreatecid=75edd708dc250137849bbf590458d401'