passbolt/passbolt_docker

Passbolt does not run after restore from backup

Closed this issue ยท 1 comments

What you did ๐Ÿ“

I've installed passbolt in version 3.2.1-ce and restore the backup. After restoring passbolt container is in state restarting.
This problem does not occur when passbolt is in version 3.1.0-ce (backup was taken from version 3.1.0-ce).

Environment
Passbolt backup version: 3.1.0-ce
Passbolt: 3.2.0-ce

Reproduction step

  1. Install docker passbolt in version 3.1.0-ce
  2. Create a user, add an avatar, and add some passwords
  3. Create a backup
  4. Install docker passbolt in version 3.2.1-ce
  5. Stop passbolt container
  6. Restore backup
  7. Start passbolt container
  8. See container logs

What happened ๐Ÿ’ฅ ๐Ÿ“‹

 == 20210121141742 V320AddAvatarsTable: migrating
PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'avatars' already exists in /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:185
Stack trace:
#0 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(185): PDO->exec('CREATE TABLE `a...')
#1 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php(335): Phinx\Db\Adapter\PdoAdapter->execute('CREATE TABLE `a...')
#2 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(374): Phinx\Db\Adapter\MysqlAdapter->createTable(Object(Phinx\Db\Table\Table), Array, Array)
#3 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(120): Phinx\Db\Adapter\AdapterWrapper->createTable(Object(Phinx\Db\Table\Table), Array, Array)
#4 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(374): Phinx\Db\Adapter\TimedOutputAdapter->createTable(Object(Phinx\Db\Table\Table), Array, Array)
#5 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(148): Phinx\Db\Adapter\AdapterWrapper->createTable(Object(Phinx\Db\Table\Table), Array, Array)
#6 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(722): Phinx\Db\Plan\Plan->execute(Object(Migrations\CakeAdapter))
#7 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Table.php(616): Phinx\Db\Table->executeActions(false)
#8 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Table.php(138): Phinx\Db\Table->create()
#9 /etc/passbolt/Migrations/20210121141742_V320AddAvatarsTable.php(56): Migrations\Table->create()
#10 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(112): V320AddAvatarsTable->up()
#11 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(377): Phinx\Migration\Manager\Environment->executeMigration(Object(V320AddAvatarsTable), 'up', false)
#12 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php(350): Phinx\Migration\Manager->executeMigration('default', Object(V320AddAvatarsTable), 'up', false)
#13 /usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(123): Phinx\Migration\Manager->migrate('default', 20210329110000, false)
#14 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php(37): Phinx\Console\Command\Migrate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/Phinx/Migrate.php(85): Migrations\Command\Phinx\Migrate->parentExecute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /usr/share/php/passbolt/vendor/symfony/console/Command/Command.php(256): Migrations\Command\Phinx\Migrate->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /usr/share/php/passbolt/vendor/symfony/console/Application.php(971): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /usr/share/php/passbolt/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand(Object(Migrations\Command\Phinx\Migrate), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /usr/share/php/passbolt/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(126): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(179): Migrations\Command\MigrationsCommand->execute(Object(Cake\Console\Arguments), Object(Cake\Console\ConsoleIo))
#22 /usr/share/php/passbolt/vendor/cakephp/migrations/src/Command/MigrationsCommand.php(198): Cake\Console\BaseCommand->run(Array, Object(Cake\Console\ConsoleIo))
#23 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(271): Migrations\Command\MigrationsCommand->run(Array, Object(Cake\Console\ConsoleIo))
#24 /usr/share/php/passbolt/src/Command/DatabaseAwareCommandTrait.php(62): Cake\Console\BaseCommand->executeCommand(Object(Migrations\Command\MigrationsMigrateCommand), Array, Object(Cake\Console\ConsoleIo))
#25 /usr/share/php/passbolt/src/Command/MigrateCommand.php(72): App\Command\MigrateCommand->runMigrationsMigrateCommand(Object(Cake\Console\Arguments), Object(Cake\Console\ConsoleIo))
#26 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/BaseCommand.php(179): App\Command\MigrateCommand->execute(Object(Cake\Console\Arguments), Object(Cake\Console\ConsoleIo))
#27 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(336): Cake\Console\BaseCommand->run(Array, Object(Cake\Console\ConsoleIo))
#28 /usr/share/php/passbolt/vendor/cakephp/cakephp/src/Console/CommandRunner.php(172): Cake\Console\CommandRunner->runCommand(Object(App\Command\MigrateCommand), Array, Object(Cake\Console\ConsoleIo))
#29 /usr/share/php/passbolt/bin/cake.php(13): Cake\Console\CommandRunner->run(Array)
#30 {main}

What you expected to happen

Restoring from backup works correctly.

Github is for bugs - Can you specify what you did in Steps 3 and 6 regarding backups? Please post that in the forum for more help, thanks: https://community.passbolt.com/