A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/storage/docs/use-soft-deleted-buckets below:

Use soft-deleted buckets | Cloud Storage

Use soft-deleted buckets

Stay organized with collections Save and categorize content based on your preferences.

Soft delete feature overview

This page describes how to list and restore soft-deleted buckets.

Overview

After a bucket is soft-deleted, it's retained by Cloud Storage until its hard delete time, and cannot be modified while in a soft-deleted state. The hard delete time is at least as long as the latest hard delete time of the bucket's objects. After the hard delete time has elapsed, Cloud Storage permanently deletes the bucket. When you restore a soft-deleted bucket, it is returned to a live state, and objects that were in the bucket at the time of deletion can also be restored.

Considerations Required permissions

To get the permissions that you need to restore soft-deleted buckets, ask your administrator to grant you the Storage Admin (roles/storage.admin) IAM role on the Cloud Storage project.

This predefined role contains the permissions required to restore soft-deleted buckets. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to restore soft-deleted buckets:

List soft-deleted buckets

You can perform list operations to retrieve your soft-deleted buckets' metadata.

Note: A bucket cannot be listed if its hard delete time has elapsed.

Use the following instructions to list the soft-deleted buckets in your project:

Console
  1. In the Google Cloud console, go to the Cloud Storage Buckets page.

    Go to Buckets

  2. Click View options.

  3. Select Soft deleted buckets only.

  4. Click Save.

    A list of soft-deleted buckets is displayed. If a soft-deleted bucket has multiple generations, each bucket generation appears in a separate row.

Command line

To list soft-deleted buckets, use the gcloud storage ls command:

gcloud storage ls --buckets --soft-deleted --full
REST APIs Restore a soft-deleted bucket

Use the following instructions to restore a soft-deleted bucket.

When you restore a soft-deleted bucket using the Google Cloud console, you can also restore the soft-deleted objects that were in the bucket.

Console
  1. In the Google Cloud console, go to the Cloud Storage Buckets page.

    Go to Buckets

  2. Display soft-deleted buckets in the list of buckets, if they don't already appear. For steps, see List soft-deleted buckets.

  3. In the row for the bucket that you want to restore, click Restore.

  4. If the bucket has multiple generations, on the Specify bucket generation tab, select the generation to restore.

  5. Click the Specify objects to restore tab.

  6. In the Specify objects to restore section, select whether you want to restore the soft-deleted objects that were in the bucket. The following options are available:

  7. Optional: Specify additional restore behaviors in the Additional options section.

  8. Click Restore.

    Cloud Storage restores the soft-deleted bucket to a live state.

    If you restore the objects in the bucket, Cloud Storage creates a bulk restore operation for the objects. The operation occurs asynchronously and might take an hour or more to begin. You can track the progress of the operation by clicking the Notifications button (notifications) in the Google Cloud console header. Or, you can use the gcloud CLI to track the status of the associated long-running operation.

Command line

To restore a soft-deleted bucket, use the gcloud storage restore command:

  gcloud storage restore gs://BUCKET_NAME#GENERATION_NUMBER

Replace the following:

Cloud Storage restores the soft-deleted bucket to a live state. Note that restoring the bucket doesn't restore the objects that were in the bucket. To restore the soft-deleted objects, see Restore a soft-deleted object.

REST APIs What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-02 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.5