Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-10851

Review backup and restore steps for zync-database

XMLWordPrintable

    • 5
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      Restoring zync database as described in the document, the following command output lots of error messages and it's impossible to determine whether the command was successful or not.
      The errors are expected because the database scheme is configured when zync-database pod is deployed and the restore command tries to configure duplicated settings. So please consider changing the backup and restore commands to more appropriate commands and document how to confirm whether it is succeeded.

      oc rsh $(oc get pods -l 'deploymentConfig=zync-database' -o json | jq -r '.items[0].metadata.name') bash -c 'psql zync_production -f ${HOME}/zync-database-backup'
      

      example:

      psql:/var/lib/pgsql/zync-database-backup:40: ERROR:  type "integration_state" already exists
      psql:/var/lib/pgsql/zync-database-backup:58: ERROR:  function "que_validate_tags" already exists with same argument types
      psql:/var/lib/pgsql/zync-database-backup:94: ERROR:  relation "que_jobs" already exists
      psql:/var/lib/pgsql/zync-database-backup:121: ERROR:  function "que_determine_job_state" already exists with same argument types
      psql:/var/lib/pgsql/zync-database-backup:185: ERROR:  function "que_job_notify" already exists with same argument types
      psql:/var/lib/pgsql/zync-database-backup:256: ERROR:  function "que_state_notify" already exists with same argument types
      psql:/var/lib/pgsql/zync-database-backup:271: ERROR:  relation "applications" already exists
      psql:/var/lib/pgsql/zync-database-backup:285: ERROR:  relation "applications_id_seq" already exists
      psql:/var/lib/pgsql/zync-database-backup:306: ERROR:  relation "ar_internal_metadata" already exists
      psql:/var/lib/pgsql/zync-database-backup:322: ERROR:  relation "clients" already exists
      psql:/var/lib/pgsql/zync-database-backup:336: ERROR:  relation "clients_id_seq" already exists
      

      All outputs are in the attached restore.log.

              Unassigned Unassigned
              rhn-support-tkonishi Takayuki Konishi
              Lluis Cavalle Lluis Cavalle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: