Introduction
Essentially, this is an automated and configurable backup tool built around rsync.
The Basics¶
Nautical runs on a CRON
schedule to:
- Stop the container (if configured)
- Run the backup via
rsync
- 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.9 #(7)!
container_name: nautical-backup
volumes:
- /var/run/docker.sock:/var/run/docker.sock #(1)!
- /config:/config #(9)!
- /opt/docker-volumes:/app/source #(2)!
- /mnt/nfs-share/backups:/app/destination #(3)!
- Mount the docker socket. Used to start and stop containers. See the Docker Socket Proxy page for more information.
- Mount the
source
directory. - Mount the
destination
directory. - TIP: Avoid using "quotes" in the enviornment variables.
- Scheduled time to run backups. Use this website to help pick a CRON schedule.
- Default =
0 4 * * *
- Every day at 4am.
- Default =
- Containers to skip for backup. A comma seperated list.
- 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.
- Set the time-zone. See this Wikipedia page for a list of available time-zones.
- Configuration folder. This directory will will Nautical's internal database which stores metrics and history.
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)!
-e SKIP_CONTAINERS="example1,example2,example3" \ #(6)!
minituff/nautical-backup:2.9 #(7)!
- Mount the docker socket. Used to start and stop containers. See the Docker Socket Proxy page for more information.
- Mount the
source
directory. - Mount the
destination
directory. - TIP: Avoid using "quotes" in the enviornment variables.
- Scheduled time to run backups. Use this website to help pick a CRON schedule.
- Default =
0 4 * * *
- Every day at 4am.
- Default =
- Containers to skip for backup. A comma seperated list.
- 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.
- Set the time-zone. See this Wikipedia page for a list of available time-zones.
- Configuration folder. This directory will will Nautical's internal database which stores metrics and history.