Open link in a new tab

Content

Expand project menu

Restoring DataBase from Backup SQL on Synology / Docker [SOLVED]

Hi,

I run Open Project 12.1.6 on a Synology NAS with Docker.

How can I restore DataBase from SQL Backup generated by OpenProject fonctionnality ?

I can't find restore menu in administration menu (hoping  it was on same page as backup)

Do i need to use bash ? And in this case, is there a documentation to do this.

Many thank's

Alain

Message actions

Hi Alain,

you will need to login to the terminal and use this documentation for docker-compose:

https://www.openproject.org/docs/installation-and-operations/operation/restoring/#docker-based-installation

Good luck and kind regards.

Message actions

Using Docker Container bash in Synology docker interface works for me !

First of all, use synology file station to create a folder <<Drive>> for exemple

Copy openproject.sql in that folder

Stop OpenProject container

Modify OpenProject container : add a mounted drive : browse <<Drive>> with <<DockerDrive>> name in container

Launch OpenProject container and wait OpenProject is running

Go to terminal tabs and add a bash

In this bash :

Give access to <<DockerDrive>> folder to everybody (especialy postgres) 

  • chmod +rwx /DockerDrive
  • chmod g+rwx /DockerDrive
  • chmod o+rwx /DockerDrive

change user to postgres : su postgres

launch psql

list postgres database : \l (should have a postgres database)

connect to postgres database : \c postgres (this is necessary to allow dropping openproject database)

Drop OpenProject database : DROP DATABASE openproject;

Create empty openproject database : CREATE DATABASE openproject OWNER openproject;

Grant acces to user postgres to openproject database : GRANT ALL PRIVILEGES ON openproject TO postgres

Connect to openproject database : \c openproject

Restaure the dump : \i /DockerDrive/openproject.sql