• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Best way to include persistent Docker data in Plesk Backups?

propz

New Pleskian
Server operating system version
Debian 12
Plesk version and microupdate number
18.0.68
Hi guys,

I managed to self host a couple of Docker Images and it's running fine.
However, I would like Plesk to backup the persistent data from the volume mapping and this seems quite tricky.

This is an exmaple on how I configured my Selfhosted Vaultwarden Server:
  1. Create Subdomain: vault.domain.com
  2. Create Container for Vaultwarden Server and fill in needed ENV Variables
  3. Volume mapping:
    - Host: /var/www/vhosts/domain.com/vault.domain.com/
    - Container: /data
  4. Docker Container can't write to the specified folder, so I need to change the folder owner to user id 1000 (AI gave me the answer)
    This is how the permissions look like:

    Code:
    drwxr-xr-x  2     1000 psaadm    4096 Apr 23 23:29 attachments
    -rw-r--r--  1     1000 psaadm  806912 Apr 23 23:34 db.sqlite3
    -rw-r--r--  1     1000 psaadm   32768 Apr 23 23:37 db.sqlite3-shm
    -rw-r--r--  1     1000 psaadm   32992 Apr 23 23:37 db.sqlite3-wal
    drwxr-xr-x  2     1000 psaadm    4096 Apr 23 23:47 icon_cache
    -rw-r--r--  1     1000 psaadm     464 Apr 23 23:29 index.html
    -rw-r--r--  1     1000 psaadm    1675 Apr 23 23:29 rsa_key.pem
    drwxr-xr-x  2     1000 psaadm    4096 Apr 23 23:29 sends
    drwxr-xr-x  2     1000 psaadm    4096 Apr 23 23:29 tmp

  5. Map Container port to a free server port without exposing it (e.g. 12345)
  6. Configure nginx to work as proxy for the subdomain (turn off apache completely)

    NGINX:
    location / {
        proxy_pass http://localhost:12345; # Proxy requests to your application
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
Done, now I can access vaultwarden via vault.domain.com.
So far so good.

But: the reason why I mapped the volume to the subdomain folder is because I want Plesk to include the persistent data in the normal backup. But that doesn't work because of the changed permissions...

Code:
Warning: Subscription "domain.com"
Not all the data from /var/www/vhosts/domain.com was backed up successfully:
  vault.domain.com: Cannot open: Permission denied
  vault.domain.com/db.sqlite3: Cannot stat: Permission denied.
  [...]

So: How can I achieve this?
What's the right way to include the persistent data in the backup?
 
Back
Top