diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..b26664fc --- /dev/null +++ b/404.html @@ -0,0 +1,532 @@ + + + +
+ + + + + + + + + + + + + + + + + + +These exmaples used Docker Compose syntax. See the Installation section to fit them into your configuration.
+Don't have all your container volumes in the same directory? That's okay, we can use Docker volume mappings to help.
+Remember the folder naming convention
+container-name
must match the source
and destination
folder names.volumes:
+ # Standard config
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /source:/app/source
+ - /destination:/app/destination
+ # Alternative source directories examples
+ - /opt/pihole:/app/source/pihole
+ - /mnt/docker_volumes/plex:/app/source/plex
+
This config allows the addition of volumes outside the traditional source
directory.
We added 2 additional source volumes: pihole
and plex
. The end result will have a source directory inside the Nautical container that looks like this:
<Nautical Backup>/app/source:
+ - container1-data #(1)!
+ - container2-data #(2)!
+ - pihole # Mapped from /opt/pihole
+ - plex # Mapped from /mnt/docker_volumes/plex
+
/source
directory/source
directoryvolumes:
+ # Standard config
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /destination:/app/destination
+ # Alternative source directories examples
+ - /opt/pihole:/app/source/pihole
+ - /opt/trilium:/app/source/trilium
+ - /mnt/docker_volumes/plex:/app/source/plex
+ - /var/data/portainer:/app/source/portainer
+
<Nautical Backup>/app/source:
+ - pihole # Mapped from /opt/pihole
+ - trilium # Mapped from /opt/trilium
+ - plex # Mapped from /mnt/docker_volumes/plex
+ - portainer # Mapped from /var/data/portainer
+
We can also remap the distination directory for any container we'd like.
+Remember the folder naming convention
+container-name
must match the source
and destination
folder names.volumes:
+ # Standard config
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /source:/app/source
+ - /destination:/app/destination
+ # Alternative destination directories examples
+ - /opt/pihole-backup:/app/destination/pihole
+ - /mnt/docker_volume-backups/plex:/app/destination/plex
+
This config allows the addition of volumes outside the traditional destination
directory.
We added 2 additional destination volumes: pihole
and plex
. The end result will have a destination directory inside the Nautical container that looks like this:
<Nautical Backup>/app/destination:
+ - container1-data #(1)!
+ - container2-data #(2)!
+ - pihole # Mapped to /opt/pihole-backup
+ - plex # Mapped to /mnt/docker_volume-backups/plex
+
/source
directory/source
directoryvolumes:
+ # Standard config
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /source:/app/source
+ # Alternative destination directories examples
+ - /opt/pihole:/app/destination/pihole
+ - /opt/trilium:/app/destination/trilium
+ - /mnt/docker_volumes/plex:/app/destination/plex
+ - /var/data/portainer:/app/destination/portainer
+
<Nautical Backup>/app/destination:
+ - pihole # Mapped to /opt/pihole
+ - trilium # Mapped to /opt/trilium
+ - plex # Mapped to /mnt/docker_volumes/plex
+ - portainer # Mapped to /var/data/portainer
+
Nautical provides configuration in the form of Docker enviornment variables.
+See the Installation Section, which contains a few examples of applying enviornment variables.
+If a container has an Enviornment Variable applied as well as a conflicting Label, then:
+++The continer Label takes priority over the global Natical enviornment variable.
+
Sets the time-zone to be used by the CRON schedule. If this environment variable is not set, Nautical will use the default time-zone: Etc/UTC
.
To change the time-zone, see this Wikipedia page, find your location and use the value in TZ Database Name
, e.g America/Los_Angeles
.
++Default: Etc/UTC
+
TZ=America/Los_Angeles
+
docker exec nautical-backup date
+Allow changing the schedule for when the backup is started.
+++Default: 0 4 * * *
+
CRON_SCHEDULE=0 4 * * *
+
Tell Nautical to skip backup of containers in this list.
+This list can either be the container name
or full id
.
++Default: empty (no skips)
+
SKIP_CONTAINERS=container-name1,container-name2,container-name3
+
SKIP_CONTAINERS=container-name1,056bd2e970c1338782733fdbf1009c6e158c715d0d105b11de88bd549430e7f5
+
Getting the full container ID
+Usally, it's easier to just use the container-name
, but if you need to use the full ID, these commands will help:
docker ps --no-trunc
docker inspect <container name>
🔄 This is the same action as the Disable Nautical label, but applied globally.
+Require the Docker Label nautical-backup.enable=true
to be present on each contianer or it will be skipped.
++Default: false
+
REQUIRE_LABEL=true
+
See the Enable or Disable Nautical Label Section for more details.
+Allows a source directory and container-name that do not match.
+++Default: empty (use container name)
+Format:
+<container-name>:<local source folder name>
(comma seperated for multiple items)
Normally a container is backed up only when the container-name
is the exact same as the source folder name
.
For example, a container named Pi.Alert
will be skipped with a source directory name of pialert
.
+To fix this, we can override the source directory name so that it does not need to match the container name.
OVERRIDE_SOURCE_DIR=Pi.Alert:pialert
+
We can override multiple containers if we seperate them with a comma. +
OVERRIDE_SOURCE_DIR=example1:example1-new-source-data,ctr2:ctr2-new-source
+
Container Name | +Old Source Directory | +New Source Directory | +
---|---|---|
example1 | +src/example1 |
+src/example1-new-dest-data |
+
ctr2 | +src/ctr2 |
+src/newdest |
+
🔄 This is the same action as the Override Source Directory label, but applied globally.
+Changes the destination backup name to be something other than the container name.
+++Default: empty (use container name)
+Format:
+<container-name>:<new destination folder name>
(comma seperated for multiple items)
Normally, a container is backed to a folder with the same name as the container-name
.
For example, let's say we have a container named Pi.Alert
. By default, the container will be backed up to a folder named Pi.Alert
.
+If we want to change this destination folder name to be pialert
, we can do that using overrides.
OVERRIDE_DEST_DIR=Pi.Alert:pialert
+
OVERRIDE_DEST_DIR=example1:example1-new-dest-data,ctr2:newdest
+
The example above would yield the following results:
+Container Name | +Old Destination Directory | +New Destination Directory | +
---|---|---|
example1 | +dest/example1 |
+dest/example1-new-dest-data |
+
ctr2 | +dest/ctr2 |
+dest/newdest |
+
🔄 This is the same action as the Override Destination Directory label, but applied globally.
+Enable or Disable the automatically generated report file.
+++Default: true
+
REPORT_FILE=true
+
Bypass stopping the container before performing a backup. This can be useful for containers with minimal configuration.
+++Default: empty (no containers will be skipped)
+
SKIP_STOPPING=example1,example2
+
Not stoppping containers can produce corrupt backups.
+Containers with databases--particularly SQL--need to be shutdown before backup.
+Only do this on containers you know for certain do not need to be shutdown before backup.
+🔄 This is the same action as the Stop Before Backup label, but applied globally.
+Will immediatly perform a backup when the container is started in addition to the CRON sheduled backup.
+++Default: false
+
BACKUP_ON_START=true
+
Log each rsync
command to console before running (useful for debugging)
++Default: false
+
LOG_RSYNC_COMMANDS=true
+
rsync -ahq --exclude='*.log' --exclude='*.txt' /app/source/watchtower/ /app/destination/watchtower/
+
Use the default rsync
arguemnts -raq
(recursive, archive, quiet)
Useful when using Custom rsync Arugments
+++Default: true
+
USE_DEFAULT_RSYNC_ARGS=false
+
Apply custom rsync
args (in addition to the default args)
++Default: empty (no custom rsync args will be applied)
+
The RSYNC_CUSTOM_ARGS
will be inserted after the $DEFAULT_RSYNC_ARGS
as shown:
+
rsync $DEFAULT_RSYNC_ARGS $RSYNC_CUSTOM_ARGS $src_dir/ $dest_dir/
+
There are many rsync
arguments and customizations that be be used here.
# Don't backup any .log or any .txt files
+RSYNC_CUSTOM_ARGS=--exclude='*.log' --exclude='*.txt'
+
+
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Ha=/["'&<>]/;Un.exports=$a;function $a(e){var t=""+e,r=Ha.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i