passman icon indicating copy to clipboard operation
passman copied to clipboard

Creating mysqldump causes error passman-table does not exist

Open flostyen opened this issue 8 years ago • 2 comments

Bug report

When I try to make a mysqldump for backup purposes, I receive the following error: mysqldump: Got error: 1932: "Table 'nextcloud_db.oc_passman_credentials' doesn't exist in engine" when using LOCK TABLES

Steps to reproduce

  1. Make mysqldump, for example using the update.sh script from the nextcloud vm image:
Upgrade from 13.0.1 to 13.0.2 using "/var/scripts/update.sh"
  Update fails/stops with error:

  Latest release is: 13.0.2. Current version is: 13.0.1.
  New version available! Upgrade continues...
  Checking latest released version on the Nextcloud download server and if it's possible to download...
  nextcloud-13.0.2.tar.bz2 100%[========>] 42.76M 9.56MB/s in 4.5s
  Backing up files and upgrading to Nextcloud 13.0.2 in 10 seconds...
  Press CTRL+C to abort.
  Doing mysqldump of nextcloud_db... 
mysqldump: Got error: 1932: "Table 'nextcloud_db.oc_passman_credentials' doesn't exist in engine" when using LOCK TABLES

Expected behaviour

mysqldump should be normally created

Actual behaviour

mysqldump failes due to missing table of passman 'nextcloud_db.oc_passman_credentials'

Configuration

Operating system:
Ubuntu 16 LTS

Browser:
Firefox Latest

Extensions that might cause interference:

Passman version:
The one which comes with Nextcloud VM Appliance 13.0.0. I besides updating it to 13.0.1 I havent done anything with passman or the nextcloud appliance.

Operating system: Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-122-generic x86_64)

Web server: Apache

Database: MySQL

PHP version:

cloud server: Nextcloud or ownCloud Nextcloud

cloud version: (see admin page or version.php) Nextcloud 13,0,1,1

flostyen avatar Jun 08 '18 18:06 flostyen

A small correction, the Passman app comes directly from the Nextcloud store an is installed with occ app:install passman

Ref: https://github.com/nextcloud/vm/blob/master/lib.sh#L451

enoch85 avatar Jun 09 '18 08:06 enoch85

I found the solution to the issue:

  1. Disable the nextcloud (occ) app "passman".
  2. Remove the nextcloud (occ) app "passman".
  3. Go to your database and remove all passman tables:
root@xyz:/var/www/nextcloud# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 465848
Server version: 10.2.14-MariaDB-10.2.14+maria~xenial-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| XXXXXX  |
| XXXXXX  |
| nextcloud_db       |
| XXXXXX  |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> use nextcloud_db;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [nextcloud_db]> show tables;
+---------------------------------+
| Tables_in_nextcloud_db          |
+---------------------------------+
[...]
| oc_passman_credentials          |
| oc_passman_delete_vault_request |
| oc_passman_files                |
| oc_passman_revisions            |
| oc_passman_share_request        |
| oc_passman_sharing_acl          |
| oc_passman_vaults               |
[...]
+---------------------------------+
XX rows in set (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_credentials;
Query OK, 0 rows affected, 1 warning (0.02 sec)

MariaDB [nextcloud_db]> drop table oc_passman_delete_vault_request;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_files;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_revisions;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_share_request;
Query OK, 0 rows affected, 1 warning (0.01 sec)

MariaDB [nextcloud_db]> drop table oc_passman_sharing_acl;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]> drop table oc_passman_vaults;
Query OK, 0 rows affected, 1 warning (0.00 sec)

MariaDB [nextcloud_db]>
MariaDB [nextcloud_db]> quit
Bye

  1. I tried to reinstall but disable passman (not sure if this is necessary):
root@xyz:/var/www/nextcloud# cd /var/www/nextcloud; sudo -u www-data php ./occ app:install passman
passman already installed
root@xyz:/var/www/nextcloud#
root@xyz:/var/www/nextcloud# cd /var/www/nextcloud; sudo -u www-data php ./occ app:disable passman
No such app enabled: passman
root@xyz:/var/www/nextcloud#
  1. mysqldump works again.

Thanks for the support enoch85 :)

flostyen avatar Jul 23 '18 13:07 flostyen