Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-11943

As a repository administrator I would like to restore a recently deleted repository



    • Suggestion
    • Status: Gathering Interest (View Workflow)
    • Resolution: Unresolved
    • None
    • Git Hosting
    • None
    • 1
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.


      Problem / Use case

      A user has recently deleted a repository by mistake, however it is still needed by other members of the team. There are no single backups of this repository and no developers have a local clone of this repository. Even if there were a local clone, the metadata associated with the repository (configuration, pull requests, etc.) are not available to be restored.

      Possible solutions

      Mark as deleted

      Mark a repository as deleted and keep all metadata and the repository on disk intact but inaccessible.

      • A server or system administrator could then go ahead and permanently delete any such repositories; or
      • A scheduled cleanup could be performed on a configurable timeout (e.g. automatically clean up repositories that are marked as deleted after 60 days)

      Delete with backup

      Prior to the actual deletion of a repository, automatically create a backup of the current state of the repository and make this accessible to download to administrators.

      • A server or system administrator could then permanently delete this backup once they have a local copy or it is no longer needed.
      • A scheduled cleanup could be performed on a configurable timeout to delete old backup files.

      Related issues and information

      If you'd like more information about restoring an accidentally deleted repository, please read our knowledge base article about this, however note that it requires a backup of some sort to be available, either in the form of a proper backup or a local clone of the repository.

      Note that there is a very similar feature request open for restoring a repository and all its details from a backup. This issue is specifically about Bitbucket Server preserving the data and state of a repository in some way upon deletion so that it can be seamlessly restored without the use of an external backup.

      There are several recommended and supported backup strategies, please be sure to use the right backup strategy for your individual needs.


        Issue Links



              Unassigned Unassigned
              abimba@atlassian.com Andrew Bimba
              4 Vote for this issue
              9 Start watching this issue