Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel2
outlinefalse
typelist
printablefalse

Recover a bucket by recreating Recreate the object using the recreatecid query argument to recover a bucket if a the domain or bucket (context object) is mistakenly deleted in the storage cluster by mistake

Note

Caution

Any mistakes in using these below 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

Tip

If the grace period (health.recursiveDeleteDelay) following follows 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.

Info

Preserving Headers

Preserve the existing domain or bucket. See SCSP Headers.

  • Look for Policy-* headers, such as Policy-Replication, Policy-ECEncoding, Policy-ECMinStreamSize, Policy-Versioning, and Policy-Lifecycle, and the x-tenant-meta-name header that Gateway uses to group domains under a tenant.

  • Add the preserve SCSP Query Arguments to the COPY request to verify any custom metadata existing on the object is carried over to the copy. (v9.2)

  • Include the header name with the new value on the request to overwrite an existing value. 

See Headers to preserve in SCSP COPY.

Recovering a Deleted Domain

A new domain cannot be created with the an 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 Buckets - The buckets in the deleted domain reference are not by with the name but by with UUID (Castor-System-CID). These buckets are not accessible until a new domain is created which uses the original UUID.

...

  1. Locate and record the log message related to the missing domain.

    Code Block
    languagebash
    Domain 'example.com' (uuid=a2fc4bb0fc31bbc73a088783aef8ea73) has been deleted ...
  2. Copy the UUID listed within the log message to recreate the missing domain.

    Code Block
    languagebash
    a2fc4bb0fc31bbc73a088783aef8ea73
  3. Create a new domain with a POST that references the deleted domain's UUID in the recreatecid query argument: 

    Code Block
    languagebash
    curl -i -X POST --location-trusted --post301 --user 'admin:datacore' --data-binary '' \
      -H 'Content-type: application/castorcontext' \
      -H "Policy-*: {if needed}" \
      'http://10.160.132.33?domain=unwanted-chs-eu-domain1&admin&recreatecid=04648a25e90c0b036435caa6d03295be'
  4. If the domain and its content are not required, delete them. This is optional.

    Code Block
    languagebash
    curl -i --location-trusted -u admin:datacore -X DELETE
    'http://10.160.132.33/04648a25e90c0b036435caa6d03295be?admin&recursive'

...

  1. Locate and record a critical log message related to the missing bucket, resulting from a named object within it being inaccessible. 

    Code Block
    languagebash
    Bucket 'mybucket' (uuid=75edd708dc250137849bbf590458d401) in domain 'example.com' has been deleted with orphan content. 
    Consider recreating.
  2. Copy the UUID listed within the log message to recreate the missing bucket.

    Code Block
    languagebash
    75edd708dc250137849bbf590458d401
  3. Create a new bucket with a POST that references the deleted bucket's UUID in the recreatecid query argument:

    Code Block
    languagebash
    $ 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'
  4. Include the below versioning header when restoring all versions from the deleted bucket:

    Code Block
    -H "policy-versioning: enabled"
Note

Warning

If you restore a bucket (that WAS versioned) and do not include the versioning header (see above) when recreating the bucket, the old versions will immediately start getting cleaned up by the Health Processor.

Note

  • If you try to restore all versions from the deleted bucket, include this header. If you are recreating the bucket only to delete the bucket contents, there is no need to include this header.

  • If you are recreating the bucket that if you need to recover the metadata from the deleted bucket, do this before recovering the bucket:

    Code Block
    curl -u admin:<admin password> -I --location-trusted "<Swarm node>/<UUID>?etag&admin&readmarker”