Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to restore any backup ->2.6.0 #1937

Closed
ChurchCRMBugReport opened this issue Feb 18, 2017 · 5 comments
Closed

Unable to restore any backup ->2.6.0 #1937

ChurchCRMBugReport opened this issue Feb 18, 2017 · 5 comments

Comments

@ChurchCRMBugReport
Copy link

This is a P0

Collected Value Title Data
Page Name /RestoreDatabase.php
Screen Size 1024x1280
Window Size 869x1280
Page Size 869x1280
Platform Information Linux scotchbox 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64
PHP Version 7.0.14-2+deb.sury.org~trusty+1
ChurchCRM Version 2.6.0
Reporting Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Prerequisite Status All Prerequisites met
Integrity check status {"status":"success"}
Apache Modules core,mod_so,mod_watchdog,http_core,mod_log_config,mod_logio,mod_version,mod_unixd,mod_access_compat,mod_alias,mod_auth_basic,mod_authn_core,mod_authn_file,mod_authz_core,mod_authz_host,mod_authz_user,mod_autoindex,mod_deflate,mod_dir,mod_env,mod_expires,mod_filter,mod_headers,mod_include,mod_mime,prefork,mod_negotiation,mod_php7,mod_rewrite,mod_setenvif,mod_socache_shmcb,mod_ssl,mod_status
@crossan007 crossan007 self-assigned this Feb 18, 2017
@crossan007 crossan007 added this to the 2.6.0 milestone Feb 18, 2017
@crossan007
Copy link
Contributor

crossan007 commented Feb 18, 2017

Error making API Call to: /api/database/restore

Error text: Unable to execute INSERT statement [INSERT INTO version_ver (ver_ID, ver_version, ver_update_start, ver_update_end) VALUES (:p0, :p1, :p2, :p3)]

Stack Trace:
[
  "#0 /var/www/public/ChurchCRM/model/ChurchCRM/Base/Version.php(711): ChurchCRM\\Base\\Version->doInsert(Object(Propel\\Runtime\\Connection\\ConnectionWrapper))",
  "#1 /var/www/public/ChurchCRM/model/ChurchCRM/Base/Version.php(675): ChurchCRM\\Base\\Version->doSave(Object(Propel\\Runtime\\Connection\\ConnectionWrapper))",
  "#2 [internal function]: ChurchCRM\\Base\\Version->ChurchCRM\\Base\\{closure}()",
  "#3 /var/www/public/vendor/propel/propel/src/Propel/Runtime/Connection/TransactionTrait.php(35): call_user_func(Object(Closure))",
  "#4 /var/www/public/ChurchCRM/model/ChurchCRM/Base/Version.php(688): Propel\\Runtime\\Connection\\ConnectionWrapper->transaction(Object(Closure))",
  "#5 /var/www/public/ChurchCRM/Service/SystemService.php(316): ChurchCRM\\Base\\Version->save()",
  "#6 /var/www/public/ChurchCRM/Service/SystemService.php(90): ChurchCRM\\Service\\SystemService->upgradeDatabaseVersion()",
  "#7 /var/www/public/api/routes/database.php(21): ChurchCRM\\Service\\SystemService->restoreDatabaseFromBackup(Array)",
  "#8 [internal function]: Closure->{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)",
  "#9 /var/www/public/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)",
  "#10 /var/www/public/vendor/slim/slim/Slim/Route.php(325): Slim\\Handlers\\Strategies\\RequestResponse->__invoke(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)",
  "#11 /var/www/public/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(116): Slim\\Route->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
  "#12 /var/www/public/vendor/slim/slim/Slim/Route.php(297): Slim\\Route->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
  "#13 /var/www/public/vendor/slim/slim/Slim/App.php(443): Slim\\Route->run(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
  "#14 /var/www/public/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(116): Slim\\App->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
  "#15 /var/www/public/vendor/slim/slim/Slim/App.php(337): Slim\\App->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
  "#16 /var/www/public/vendor/slim/slim/Slim/App.php(298): Slim\\App->process(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
  "#17 /var/www/public/api/index.php(56): Slim\\App->run()",
  "#18 {main}"
]

@crossan007
Copy link
Contributor

crossan007 commented Feb 18, 2017

Despite the error - it looks like the database actually does (a partial) restore...

@crossan007
Copy link
Contributor

crossan007 commented Feb 18, 2017

It looks like something is trying to make two INSERT queries for version_ver.

I enabled SQL query logging on my QA VM, and I'm seeing this:

                  107 Query     START TRANSACTION
                  107 Query     DESCRIBE version_ver
                  107 Query     INSERT INTO version_ver (ver_ID, ver_version, ver_update_start, ver_update_end) VALUES (NULL, '2.6.0', '2017-02-18 13:35:20.000000', '2017-02-18 13:35:20.000000')
                  107 Query     COMMIT
                  107 Query     Select * from version_ver
                  107 Query     START TRANSACTION
                  107 Query     DESCRIBE version_ver
                  107 Query     INSERT INTO version_ver (ver_ID, ver_version, ver_update_start, ver_update_end) VALUES (NULL, '2.6.0', '2017-02-18 13:35:20.000000', '2017-02-18 13:35:20.000000')
                  107 Query     ROLLBACK
                  106 Quit
                  107 Quit

@crossan007
Copy link
Contributor

This can re reproduced by trying to restore the demo data file from the 2.5.2 source code archive.

@crossan007 crossan007 changed the title Unable to restore 2.5.2->2.6.0 Unable to restore any backup ->2.6.0 Feb 19, 2017
@nntloc
Copy link

nntloc commented May 10, 2019

i've same a problem for my site https://quanlyhoithanh.com/my-dinh/SystemDBUpdate.php

How to fix that @crossan007 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants