nautical-backup icon indicating copy to clipboard operation
nautical-backup copied to clipboard

Labels do not work

Open pendraggon87 opened this issue 1 year ago • 5 comments

I have configured the backup container to require the use of the nautical-backup.enable label. However, even when I use this label on numerous containers, nautical-backup will skip backing them up.

pendraggon87 avatar Sep 03 '24 12:09 pendraggon87

Hi,

Could you set the log level to TRACE and attach your Nautical config and logs as well as one of the skipped container's config.

Is it skipping all containers? I wonder if it's not detecting the enable label?

Minituff avatar Sep 03 '24 16:09 Minituff

I see errors like this in TRACE: DEBUG: paperless-webserver-1 - Source directory '/app/source/paperless-webserver-1' does not exist. Skipping

pendraggon87 avatar Sep 05 '24 12:09 pendraggon87

Ahh okay I think I understand. It seems like the nautical-backup.enable label is working properly. The issue seems to be that the /app/source/paperless-webserver-1 doesn't exist inside Nautical.

Take a look at this example:

services:
  nautical-backup:
    image: minituff/nautical-backup:2 
    container_name: nautical-backup
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /config:/config
      - /path/to/docker/volumes:/app/source  # <---  Source
      - /destination:/app/destination

The most relevant line is this one: - /path/to/docker/volumes:/app/source.

Here we are telling Docker to pass all the files/folders from /path/to/docker/volumes into the Nautical container at the path /app/source.

In your case, can you check to make sure your Source path is mapped correctly? Additionally, the folder paperless-webserver-1 needs to exist inside the Source path so it can be picked up.

Minituff avatar Sep 05 '24 16:09 Minituff

Hm. In this case I am using a Windows host for Docker. I am able to mount the docker volume path. However, nautical-backup seems to be looking for the volume to be the same name as the container? e.g. if I have a named volume database, docker then creates the volume authentik_database. Yet nautical-backup is looking for authentik-postgres-1 which is the name of the container.

pendraggon87 avatar Sep 06 '24 12:09 pendraggon87

However, nautical-backup seems to be looking for the volume to be the same name as the container?

Yes, this is the default action, but you have a few options if you don't want to rename the source folders.

  1. Using overrides via a global Environment variable

Here you modify the Nautical config

services:
  nautical-backup:
    image: minituff/nautical-backup:2 
    container_name: nautical-backup
    environment:
      - OVERRIDE_SOURCE_DIR=authentik-postgres-1:authentik_database
  1. Using overrides via a global via a label on each container.

Here you modify the config on each container

services:
  authentic-postgres:
    image: authentic/imagename:latest
    container_name: authentic-something
    labels:
      - nautical-backup.override-source-dir=authentik_database

Minituff avatar Sep 06 '24 16:09 Minituff

I'm closing this issue since it's so old. Please re-open if it's still relevant.

Minituff avatar May 20 '25 22:05 Minituff