Skip to content

Commit aea3add

Browse files
committed
r_b docker_mode and docker_container
1 parent 8d5c35b commit aea3add

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

rsnapshot_backup/pillar.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ rsnapshot_backup:
161161
# recommended with 'pg_dump_args: --jobs=REASONABLE_NUMBER --compress=zstd' if zstd is supported by pg_dump version
162162
#ignore_remote_dump_failed: True # optional, ignore remote dump failed error, useful if you have a lot of databases and some of them have errors, but anyway you want to sync other dumps
163163
#dump_attempts: 3 # optional, try N times to perform dump, one time by default, combine with ignore_remote_dump_failed: True, otherwise it will not be synced even if it was dumped successfully with retries
164+
#docker_mode: True # optional, use docker exec to run pg_dump commands inside docker container
165+
#docker_container: mypg1 # optional, docker container name or id, default is "empty", when docker_mode is True dump will be run inside specified container, "directory" type is not supported in docker mode
164166
- type: MONGODB_SSH # dump mongodb over ssh, then rsync dump dir over ssh
165167
data:
166168
- ALL # special meaning, expands to all databases available

rsnapshot_backup/update_config.sls

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ rsnapshot_backup_yaml:
280280
{%- if "postgresql_dump_type" in host_backups_item %}
281281
postgresql_dump_type: {{ host_backups_item["postgresql_dump_type"] }}
282282
{%- endif %}
283+
#
284+
{%- if "docker_mode" in host_backups_item %}
285+
docker_mode: {{ host_backups_item["docker_mode"] }}
286+
#
287+
{%- if "docker_container" in host_backups_item %}
288+
docker_container: {{ host_backups_item["docker_container"] }}
289+
{%- endif %}
283290
# Per backup host item is higher priority than per backup item
284291
{%- if "rsnapshot_prefix_cmd" in backup %}
285292
rsnapshot_prefix_cmd: {{ backup["rsnapshot_prefix_cmd"] }}

0 commit comments

Comments
 (0)