nextcloud / tables

🍱 Nextcloud tables app
https://apps.nextcloud.com/apps/tables
GNU Affero General Public License v3.0
143 stars 24 forks source link

[question] hor to restore data from corrupted installation #1190

Closed im-n1 closed 2 months ago

im-n1 commented 2 months ago

Steps to reproduce

My SDcard in my Odroid HC4 stopped working but I was able to save all the files (starting from /). My installation used Postgres which data I have too.

My question here is is there a way how can I copy-over the Tables data so I can see my tables in my new Nextcloud installation? I'm willing to do some basic postgres dump (if data are stored there).

My ex-installation NC version: 27 My current NC installation: 29

Expected behavior

none

Actual behavior

none

Tables app version

No response

Browser

No response

Client operating system

No response

Operating system

No response

Web server

None

PHP engine version

None

Database

None

Additional info

No response

juliushaertl commented 2 months ago

As this seems to be a infrastructure related issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com

You can probably transfer your Postgres data directory to a new installation, but I don't have any detailed insight into that.

im-n1 commented 2 months ago

@juliushaertl I already tried to move PG data but there was other issue with NC. Now I care only about the Tables data. If you tell me where the data are stored I can dig them out.

juliushaertl commented 2 months ago

https://serverfault.com/a/20088 is probably your best chance. The tables app data is stored in the postgres database, so unless you are able to recover that from the filesystem without having a dedicated database dump as a backup I don't see another way.

im-n1 commented 2 months ago

@juliushaertl yes - I have the postgres data - can I have phe table names or any other stuff that I need to transfer?

juliushaertl commented 2 months ago

All tables have the octables prefix, restoring those should work considering you use the same user ids in nextcloud as with your old installation

im-n1 commented 2 months ago

Done. Thanks.

Dump the data (on old PG instance):

$ docker exec -it gifted_keller pg_dump -U nextcloud -O -t "oc_tables*" -a nextcloud > /tmp/tables.sql

Load the data (on new PG instance:

$ docker exec -it nextcloud_db psql -U nextcloud -1 -d nextcloud -f /tmp/tables.sql