ReinerNippes / nextcloud_on_docker

Run Nextcloud in Docker Container on various Linux Hosts
MIT License
203 stars 48 forks source link

Restoring postgres db with restiq into fresh install nextcloud_on_docker #114

Open WilcoDan opened 2 years ago

WilcoDan commented 2 years ago

First of all I really appreciate the effort that was put into this ansible deployment of Nextcloud, well done. I am mediocre/noob but urgently need to restore my nextcloud.

I used nextcloud_on_docker for work purposes (team collaboration) in a project and the information on it is vital.

nextcloud_on_docker crashed since the filesystem was not the same size as partition (Ubuntu 20.04) and ran out of space. I followed the instructions on https://www.giters.com/ReinerNippes/nextcloud_on_docker/issues/46 as this was all I could find. I did a fresh install, restored the whole nextcloud directory to opt and imported the dbdump (with adminer) which was reportedly a success but there is no longer a nextcloud DB to connect to since I dropped nextcloud (with adminer) as per instructions assuming the import process would create another one. All of the dockers start up but the nextcloud site is not reachable. Not sure if this is correct but I can only reach apache 2 and only on port 80 which I understood was to be bound to nginx? If apache should not be present I am more than willing disable it...

If anyone can assist it will be greatly appreciated. nextcloud_on_docker is awesome and includes backups and db management which is one of the reasons I as a noob decided to use only this nextcloud deployment and a backup & restore guide would be the cherry on the cake for me.

Wilco Kasselman

ReinerNippes commented 2 years ago

The postgres dump - at least on my maschine - wouldn't create a nextcloud database. It would only create the schema inside a database.

See the postgres docs: https://www.postgresql.org/docs/12/backup-dump.html there is said that psql dbname < dumpfile will restore the dump into database "dbname".

That database is create on initial playbook run. It is create as an "empty" nextcloud database. With psql dbname < dumpfile the content/schema of that empty database will be replaced with your backup. For mariadb it should be the same.

WilcoDan commented 2 years ago

Thank you for the response. I am pretty sure I have done that already but I will do so again. According to you instructions I'm supposed to drop the nextcloud DB. So from what I understand now I'm supposed import the sequel dump into the freshly installed nextcloud DB... Thank you, I will try that and revert back.

WilcoDan commented 2 years ago

Herewith the feedback, I attempted as per previous communication and as well as per lots of searching and even restored multiple snapshots. Adminer crashes every time and nextcloud is not accessible. I used the process as per the following https://www.giters.com/ReinerNippes/nextcloud_on_docker/issues/46 except for dropping the freshly installed nextcloud DB and in importing the sql dump into the newly installed nextcloud DB (previously dropped it and created a new nextcloud DB as per some other recommendations found on Postgres sites) with no success.

I also tried importing the (restic) sql dump with Postgres sql as well but nothing I read could help me to achieve that. I don't believe restic is the issue but rather adminer (the sql dump is 45MB). It would be great if a could use the tools (portioner, restic and adminer) packaged in this awesome playbook and I am willing to document a beginning to end process to do it but I need to find one that works. Is replacing adminer with something else (open source) in the playbook something that would be considered? I am not able to do that but I have to ask if someone (Reiner or someone) would consider it?

WilcoDan commented 2 years ago

no response :-(