You've already forked docker-volume-backup
mirror of
https://github.com/offen/docker-volume-backup.git
synced 2025-11-29 05:46:50 +02:00
Docs site (#269)
* Set up documentation site using jekyll * Add workflow for deploying docs * Ini formatting is hard to read * Add instructions on how to run docs locally * Work through docs * Remove content from README * Miscellaneous fixes * Fix artifact upload
This commit is contained in:
44
docs/how-tos/handle-file-uploads-using-third-party-tools.md
Normal file
44
docs/how-tos/handle-file-uploads-using-third-party-tools.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Handle file uploads using third party tools
|
||||
layout: default
|
||||
parent: How Tos
|
||||
nav_order: 10
|
||||
---
|
||||
|
||||
# Handle file uploads using third party tools
|
||||
|
||||
If you want to use an unsupported storage backend, or want to use a third party (e.g. rsync, rclone) tool for file uploads, you can build a Docker image containing the required binaries off this one, and call through to these in lifecycle hooks.
|
||||
|
||||
For example, if you wanted to use `rsync`, define your Docker image like this:
|
||||
|
||||
```Dockerfile
|
||||
FROM offen/docker-volume-backup:v2
|
||||
|
||||
RUN apk add rsync
|
||||
```
|
||||
|
||||
Using this image, you can now omit configuring any of the supported storage backends, and instead define your own mechanism in a `docker-volume-backup.copy-post` label:
|
||||
|
||||
```yml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
backup:
|
||||
image: your-custom-image
|
||||
restart: always
|
||||
environment:
|
||||
BACKUP_FILENAME: "daily-backup-%Y-%m-%dT%H-%M-%S.tar.gz"
|
||||
BACKUP_CRON_EXPRESSION: "0 2 * * *"
|
||||
labels:
|
||||
- docker-volume-backup.copy-post=/bin/sh -c 'rsync $$COMMAND_RUNTIME_ARCHIVE_FILEPATH /destination'
|
||||
volumes:
|
||||
- app_data:/backup/app_data:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
# other services defined here ...
|
||||
volumes:
|
||||
app_data:
|
||||
```
|
||||
|
||||
{: .note }
|
||||
Commands will be invoked with the filepath of the tar archive passed as `COMMAND_RUNTIME_BACKUP_FILEPATH`.
|
||||
Reference in New Issue
Block a user