Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] CentOS6->7 upgrade; database backup/restore

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] CentOS6->7 upgrade; database backup/restore


Chronological Thread 
  • From: Mark Feit <>
  • To: Kathy Benninger <>, perfsonar-user <>
  • Subject: Re: [perfsonar-user] CentOS6->7 upgrade; database backup/restore
  • Date: Sun, 1 Apr 2018 15:25:12 +0000
  • Accept-language: en-US
  • Authentication-results: psc.edu; dkim=none (message not signed) header.d=none;psc.edu; dmarc=none action=none header.from=internet2.edu;
  • Ironport-phdr: 9a23:iQ5kMBMnEZNPDpNDCgEl6mtUPXoX/o7sNwtQ0KIMzox0I//yrarrMEGX3/hxlliBBdydt6ofzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1Ov71GonPhMiryuy+4ZLebxlGiTanfb9+MAi9oBnMuMURnYZsMLs6xAHTontPdeRWxGdoKkyWkh3h+Mq+/4Nt/jpJtf45+MFOTav1f6IjTbxFFzsmKHw65NfqtRbYUwSC4GYXX3gMnRpJBwjF6wz6Xov0vyDnuOdxxDWWMMvrRr0vRz+s87lkRwPpiCcfNj427mfXitBrjKlGpB6tvgFzz5LIbI2QMvd1Y6HTcs4ARWdZXshfSTFPAp+yYYUMAeoOP+dYoJXyqFYVtxSyGQysCfnzxjNUhHL727Ax3eQ7EQHB2QwtB9UAv27OrNX2KawcUf66zKjUzT7eaP5W3Dn955bJchA9uvyMXLRwcdbPxkk1EQPKkEmQpZL/MzyLy+sNrnGW4ux9Xuysk24qsx99riSty8s2hYTEh5gZxk3F+Ch32oo4JsC0RFZmbdK4E5ZcrT+WOohsTs88TGxlvDw2xqAbtZKmZCQKxoooyh3DZ/GCdoWE/BbuW/iMLTp9mX5ldr2yiwi3/EWkxODxV9S73VNKoypLjNXDrXYA3AHJ5MedUPty5EKh1C6P1w/N7uFEJlg5m7LHJpAm3rI8iIMfvFnFECPogUn2i7SZeVs+9uiv9uTnfq7pppiBN49ylw7yKLwumta4AeQkLAcBQ3Sb+eW71L3l50H5R6hKjuEykqnet5DaJt4XqbK+Aw9Qyooj6hC/ACm60NkAg3ULMFBIdAiIgoXoIV3CPfH1APmlj1mvjTtn3/XGMafgApXJIHjDirDhfbNl5k5Zxgo809Ff545PB7EAJvLzRlH+tMbeDhAnLwy43fzrB8tg2YMDQW6PGLOWMLvOsV+U4eIiO/GMa5EPuDbzMPgl4PjugmUjmVMEYKmpxoUYaGqjE/RiIkWZembsgswfHWsQvwo+SvDqh0OYUT5VeXmyQ7ww6islB427EIeQDryq1Z+IwCeqVrdbYGZHDF+BCz+8fYiCXfYKZy+ICtd6mXoJWaX3D8c52Augrwj8wqAiM/HZ4GVMrZ/52sNy4eTJ0Awp+CZcDsKB3nuLQn0u2G4EWmll8rp4pBlYw02AmYZ1guAQQdld6vJVegY8KZPGyeFmUZb/Vh+XLYTBc0qvXtjzWWJ5ddk22dJbJh8lQ9g=
  • Spamdiagnosticoutput: 1:0

Kathy Benninger writes:


I ran into the postgresql 8.4/9.5 error on backup, which resolved with removal of the 8.4 rpms…

 

That problem is CentOS 6-specific and will go away once you’re at CentOS 7.  I don’t have plans to correct it since support for CentOS 6 is being dropped in the next release.

 

…and the following error when I did the restore:

[root@rumba tmp]# /usr/lib/perfsonar/scripts/ps-migrate-restore.sh --data rumba-ps-backup_30Mar18.tgz

Restoring pScheduler from backup:
  Unpacking backup... Done.
  Restoring configuration... Done.
  Restoring database...

Database restore failed:
ERROR:  syntax error at or near "%"
LINE 1: DROP DATABASE IF EXISTS %{_pscheduler_database_name}_save;
                                ^

Restoring prior database... FAILED.ERROR:  syntax error at or near "%"
LINE 1: DROP DATABASE IF EXISTS %{_pscheduler_database_name};

 

That is a bug that slipped through because of a chicken-and-egg problem in my development environment.  The RPM spec that builds the package made use of a macro that wouldn’t have been available on a pristine system like the one where the production builds are done.  It was available on my development system because it had been installed during a previous build and wasn’t wiped out.  I’ve corrected that (and will adjust my dev and testing procedures) and will see about getting another bugfix release out after one cycle of the nightly build gets through our test bed.

 

A quick post-mortem of what will have happened on your system:  The usual process is to rename the existing database, do the restore and then get rid of the renamed database if the restore was a success or put it back as it was if the restore fails.  With this bug, the initial rename failed and the whole process stopped there, leaving the existing database intact.  All of the configuration files on your system are what was in the backup.  (We don’t have a way to make the whole thing transactional so we can roll it back.)



Can I rely on the backup/restore in spite of the error message?

 

The backup is fine and will be restorable once the bug is corrected in the production release.

 

If you want to hand-patch the system and do a restore before we get the bug fix out, edit /usr/libexec/pscheduler/commands/restore and change the string %{_pscheduler_database_name} at line 155 to pscheduler.  A restore following that should succeed.

 

--Mark

 



  • Re: [perfsonar-user] CentOS6->7 upgrade; database backup/restore, Mark Feit, 04/01/2018

Archive powered by MHonArc 2.6.19.

Top of Page