Synology DaVinci Resolve shared Database

Using a Synology as network attached Share Storage is the way for small and medium production companies for working together. With some hacks you can speed up your installation to nearly 1000 MB/s per connected Client. But in the past it has always been a mess to install a Postgres Database Server direct on the system, because the Synology DSM is using the Port 5432 by itself. I tried a lot with virtual machine workflows but you always have to maintain more systems than you want. With this target in my mind I tried to get a solution by using Docker. This is running native on the system and will bring you the best performance. For the final result I used „macvlan“ as network driver to get an (host separated) own network address for the container.

Essential items list

Things you have to know before you try it yourself.
– one free IP address where you put your Postgres Server
– your network config
– SSH access to your Synology (turn it on in your System Settings)
– interface network name used by your Synology to connect your home network

my Settings

installed Docker folder: /volume1/docker/
IP Network: 10.210.0.0/20 GW 10.210.0.1
IP for DaVinci Resolve Database Server: 10.210.2.199
Hardware interface my Synology is connected to the home network: ovs_eth1

Installation:

First Step – create folder via GUI

First create following folders in your Shared folder „docker“
– DB_DavinciResolve
and the subfolder
– db in the folder DB_DavinciResolve
– Backup in the folder DB_DavinciResolve
It should look like this if you look in the folder structure via SSH
/volume1/docker/DB_DavinciResolve
/volume1/docker/DB_DavinciResolve/db
/volume1/docker/DB_DavinciResolve/Backup

Second Step – accessing the system via SSH

Enable SSH in WebGUI

Login with your Admin into the DSM Management GUI and open the Control Panel, click on „Terminal & SNMP“ and enable SSH.

Synology enable SSH

Login via SSH

Login via SSH (if you use a MAC just open the Terminal (Applications > Utilitys > Terminal), if you use a Windows device download Putty) by typing

ssh "your_username"@"ipaddress_of_yournas"

and press enter, then enter your password (you will not see the digits, just type it and press enter)

Mac Terminal login via SSH
Mac Terminal login via SSH

Now we should get the highest privileges we can get in your Synology by typing following

sudo -s

after pressing enter you will be asked for your password. Now be careful you are the root of the system and you are able to destroy everything ;). It should look like this:

Mac Terminal login via SSH with root access

Third Step – find you network interface name

type now, and press enter

ip addr

you will get a long list (depending how many interfaces you use), search for the ip range you use in your network and when you find it mark down the name of the interface. In my case I am using the 10.210.2.33 address so my interface name is ova_eth1.

ip addr on Synology

Fourth Step – create docker-compose file

We now want to go to our in the first step created folder DB_DavinciResolve and we can do this by typing following in the terminal window:

cd /volume1/docker/DB_DavinciResolve

Now you can create a docker-compose.yml file by typing

vi docker-compose.yml

Press the key „i“ (for insert) and copy following text into the file

version: '3.6'

services:
  postgres:
    container_name: DavinciResolve_Schaupper_at
    image: postgres:9.5.4
    restart: always
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: DaVinci
    volumes:
      - /volume1/docker/DB_DavinciResolve/db:/var/lib/postgresql/data
    networks:
      intranet:
        ipv4_address: 10.210.2.199

networks:
  intranet:
    name: intranet
    driver: macvlan
    driver_opts:
      parent: ovs_eth1
    ipam:
      config:
        - subnet: "10.210.0.0/20"
          gateway: "10.210.0.1"

Change following settings by navigating with the arrow keys

– ipv4_address: 10.210.2.199
– subnet: „10.210.0.0/20“
– gateway: „10.210.0.1“
– parent: ovs_eth1

with your parameters

Press „ESC“ and write „wq“ and press Enter

Fifth Step – create Container

Now start your container with:

docker-compose up -d

and you are done. You can logout from the terminal session by closing the window and check in your Docker APP in the Synology DSM GUI if everything is running.

Sixth Step – create shared Database in DaVinci Resolve

Now try and connect with your DaVinci Resolve Client Application by opening the Projekt Manager and create a new Database

Creating a new shared Database in DaVinci Resolve

Type in the name of the database and use the same ip address you have chosen before

Creating a new shared Database in DaVinci Resolve

Seventh Step – BACKUP YOUR DATABASE

I like to use „Task Scheduler“ in the Control Panel to schedule my backups.

Synology Task Scheduler
Task Scheduler General
Task Scheduler – set the times you want to run the script
Task Scheduler – copy following code
docker exec DavinciResolve_Schaupper_at -u postgres --password=DaVinci pg_dumpall > /volume1/docker/DB_DavinciResolve/Backup/backup.sql
tar -zcvf /volume1/docker/DB_DavinciResolve/Backup/$(date +%Y%m%d).tar.gz /volume1/docker/DB_DavinciResolve/Backup/backup.sql
rm /volume1/docker/DB_DavinciResolve/Backup/backup.sql

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.

Time limit is exhausted. Please reload the CAPTCHA.

Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu. Weitere Informationen

Die Cookie-Einstellungen auf dieser Website sind auf "Cookies zulassen" eingestellt, um das beste Surferlebnis zu ermöglichen. Wenn du diese Website ohne Änderung der Cookie-Einstellungen verwendest oder auf "Akzeptieren" klickst, erklärst du sich damit einverstanden.

Schließen