Skip to content

Introduction

Essentially, this is an automated and configurable backup tool built around rsync.

The Basics

Nautical runs Bash commands on a CRON schedule to:

  1. Stop the container (if configured)
  2. Run the backup via rsync
  3. Restart the container (if stopped)

⚗️ Need more control? There are many more options available via variables and labels.

Sample Configuration

Nautical requires almost no configuration when container volumes are all in a folder matching its container-name within the source directory. Of course, we can use variables and labels to override these defaults.

Let's take a look at an example:

Container Name Source Data Directory Destination Data Directory
homepage /opt/docker-volumes/homepage /mnt/nfs-share/backups/homepage
trilium /opt/docker-volumes/trilium /mnt/nfs-share/backups/trilium
dozzle N/A (no data folder) N/A (no backup needed)

Here is how Nautical fits into the Sample Configuration

services:
  nautical-backup:
    image: minituff/nautical-backup:2.3 #(7)!
    container_name: nautical-backup
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock #(1)!
      - /opt/docker-volumes:/app/source #(2)!
      - /mnt/nfs-share/backups:/app/destination #(3)!
  1. Mount the docker socket. Used to start and stop containers.
  2. Mount the source directory.
  3. Mount the destination directory.
  4. TIP: Avoid using "quotes" in the enviornment variables.
  5. Scheduled time to run backups. Use this website to help pick a CRON schedule.
    • Default = 0 4 * * * - Every day at 4am.
  6. Containers to skip for backup. A comma seperated list.
  7. It is recommended to avoid using the latest tag.
    • This project is under active development, using a exact tag can help avoid updates breaking things.
  8. Set the time-zone. See this Wikipedia page for a list of available time-zones.
docker run -d \
  --name nautical-backup \
  -v /var/run/docker.sock:/var/run/docker.sock \ #(1)!
  -v /opt/docker-volumes:/app/source \ #(2)!
  -v /mnt/nfs-share/backups:/app/destination \ #(3)!
  minituff/nautical-backup:2.3 #(7)!
  1. Mount the docker socket. Used to start and stop containers.
  2. Mount the source directory.
  3. Mount the destination directory.
  4. TIP: Avoid using "quotes" in the enviornment variables.
  5. Scheduled time to run backups. Use this website to help pick a CRON schedule.
    • Default = 0 4 * * * - Every day at 4am.
  6. Containers to skip for backup. A comma seperated list.
  7. It is recommended to avoid using the latest tag.
    • This project is under active development, using a exact tag can help avoid updates breaking things.
  8. Set the time-zone. See this Wikipedia page for a list of available time-zones.