Skip to content

How to recover/restore using database dump and ncdata #2143

Answered by k4my4b
k4my4b asked this question in Questions
Discussion options

You must be logged in to vote

My last borg backup is from a day ago but I have a more recent backup of ncdata and nextcloud_aio_database_dump, how can I can restore everything using the two? if at all possible

I just dropped the database and recreated a new one

dropdb -U nextcloud nextcloud_database -f
createdb -U nextcloud nextcloud_database

granted permissions according to start.sh (where owner=oc_nextcloud db=nextcloud_database)

ALTER DATABASE "$POSTGRES_DB" OWNER TO "$DB_OWNER";
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "$DB_OWNER";
GRANT ALL PRIVILEGES ON SCHEMA public TO "$DB_OWNER";

and then

docker e…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nikbpetrov
Comment options

Answer selected by szaimen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants