Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-57914

Handling conflicts in backup/restore of users

    XMLWordPrintable

Details

    Description

      As backup/restore of users info has been implemented for trinity, MB-46501 , an additional feature can be implemented to handle the conflict of user restoration. 

      The conflict in backup/restore of users will be hit when the customer tries to restore a backup with users that already exist in the cluster they are trying to restore on. 

      The way to handle this:

      The default behaviour of restore of users would be to not overwrite the existing users, they should be skipped and not recreated. A flag  --overwrite-users should be available to the customer to enable overwriting of users, if needed. 

      if the default restore has been triggered, cbbackupmgr should log the users that have been skipped to allow the customer to know which ones have not been overwritten.

      if the --overwrite-users flag is used, cbbackupmgr should send a request to ns_server to overwrite all existing users, restore the deleted ones and log the overwritten users to inform the customer which ones have been overwritten.

      The approach:
      1. Add a --overwrite-users  flag to the restore in cbbackupmgr
      2. Implement a REST request to include canOverwrite==true parameter to ns_server if the --overwrite-users flag is true
      3. Read the response of the above REST request and log the necessary information.

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-57914
          # Subject Branch Project Status CR V

          Activity

            People

              gilad.kalchheim Gilad Kalchheim
              Nour.Elmenyawi Nour Elmenyawi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty