Pushing outside the data from Joplin Server

Hi,

Following this thread), i want to install Joplin Server to store notes and maybe one day to move evernote used since 10y to Joplin !

I see a new option for storage to store contents outside the db (i have 10y of evernote ...).

But i make maybe something wrong.

version: '3'

services:
    db:
        image: postgres:13
        volumes:
            - /home/boss/Notes:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=XXXXXXXXXXXXXXX
            - POSTGRES_USER=db_admin
            - POSTGRES_DB=db_joplin
            - /etc/localtime:/etc/localtime:ro
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=https://joplin.XXXXXXXXXXX.ovh
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=XXXXXXXXXXXX
            - POSTGRES_DATABASE=db_joplin
            - POSTGRES_USER=db_admin
            - POSTGRES_PORT=5432
            - POSTGRES_HOST=db
            - MAILER_ENABLED=1
            - MAILER_HOST=smtp.gmail.com
            - MAILER_PORT=587
            - MAILER_SECURITY=starttls
            - MAILER_AUTH_USER=XXXXXXXXXXXXX
            - MAILER_AUTH_PASSWORD=XXXX
            - MAILER_NOREPLY_NAME=JoplinServer
            - MAILER_NOREPLY_EMAIL=XXXXXXXXXXXXX
            - STORAGE_DRIVER=Type=Filesystem; Path=/home/boss/Contents
            - /etc/localtime:/etc/localtime:ro

Is - STORAGE_DRIVER=Type=Filesystem; Path=/home/boss/Contents correct ?

I have created on my home:

  • /notes to store db
  • /contents for file.

I cannot access to Notes directory ... only on root.

but log reports:
image

Any idea ?

How is the best strategy to secure Notes & Contents ?
First, i want to push "data" outside of the VM with mounting on a NAS per example. Is it a good idea ?
But maybe some duplication is better ? once on VM ; duplication on NAS ?

Other solution that i used on bookstack is to add a crontab every 2h ; need to do the same thing (idea) for contents once unbreaked. But here, mysql is on a docker...

(from bookstack usage) :

0 */2 * * * sudo mv -f /mnt/QNAP/Backups/Joplin/joplin.backup.sql /mnt/QNAP/Backups/Joplin/joplin.backup.sql.bak && sudo mysqldump -u root joplin > /mnt/QNAP/Backups/Joplin/joplin.backup.sql

Any idea to make a backup of the db / contents on external mount storage (nas, hdd) ?
How do you make it ?

I haven't been worried about backup from joplin-server, as I'm using joplin-desktop's "Export all". Because of that, I didn't worry about the database. I did use "STORAGE_DRIVER=Type=Filesystem", though, as I have thousands of notes form years of Evernote use (about 8GB). I believe the Path is relative to the container's file system, so what I did in addition to your configuration was to add (using your "Path" directory:

    volumes:
      - /home/boss/Contents:/home/boss/Contents

to both the joplin and joplin-db service configurations. (I'm not sure I needed it in joplin-db, but I was tired of experimenting...) Also, you need to set the ownership UID of the directory in the host file system to the container's UID for joplin.

FYI, I'm going to submit another issue to ask for environment variables that determine joplin's UID and GID in the container. This particular difference between container and host is particularly confusing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.