Skip to content

Commit ec55ecb

Browse files
committed
update documentation with enhancements since the fork
1 parent 7a18ce5 commit ec55ecb

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

docs/guide/configuration.rst

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ connecting to the Docker host. Combined with ``DOCKER_TLS_VERIFY``
188188
this can be used to talk to docker through TLS in cases
189189
were we cannot map in the docker socket.
190190

191+
INCLUDE_ALL_VOLUMES
192+
~~~~~~~~~~~~~~~~~~~
193+
194+
If defined, all volumes will be included in the backup.
195+
This is useful when you want to back up all volumes
196+
in a project without having to add labels to each service.
197+
198+
Volumes can be excluded by adding the ``stack-back.volumes.exclude``
199+
label to the service.
200+
191201
INCLUDE_PROJECT_NAME
192202
~~~~~~~~~~~~~~~~~~~~
193203

@@ -272,6 +282,30 @@ Their path in restic will be:
272282
- /volumes/myservice/srv/files
273283
- /volumes/myservice/srv/data
274284

285+
In situations where the files in the volume are at risk of being
286+
corrupted during the backup process (such as SQLite databases),
287+
the `stack-back.volumes.stop-during-backup` label can be added to
288+
the service. This will stop the service during the backup process
289+
and start it again when the backup is done.
290+
291+
Example:
292+
293+
.. code:: yaml
294+
295+
myservice:
296+
image: some_image
297+
labels:
298+
stack-back.volumes: true
299+
stack-back.volumes.stop-during-backup: true
300+
volumes:
301+
- uploaded_media:/srv/media
302+
- uploaded_files:/srv/files
303+
- /srv/data:/srv/data
304+
305+
volumes:
306+
media:
307+
files:
308+
275309
A simple `include` and `exclude` filter for what volumes
276310
should be backed up is also available. Note that this
277311
includes or excludes entire volumes and are not include/exclude
@@ -333,16 +367,16 @@ when using the official mariadb_ image.
333367

334368
.. code::
335369
336-
MYSQL_USER
337-
MYSQL_PASSWORD
370+
MARIADB_USER
371+
MARIADB_PASSWORD
338372
339373
Backups are done by dumping all databases directly into
340374
restic through stdin using ``mysqldump``. It will appear
341375
in restic as a separate snapshot with path
342376
``/databases/<service_name>/all_databases.sql``.
343377

344378
.. warning: This will only back up the databases the
345-
``MYSQL_USER` has access to. If you have multiple
379+
``MARIADB_USER` has access to. If you have multiple
346380
databases this must be taken into consideration.
347381
348382
Example:

0 commit comments

Comments
 (0)