Skip to content

Commit 60e712c

Browse files
committed
r_b db_user
1 parent 757b3a0 commit 60e712c

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

rsnapshot_backup/pillar.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ rsnapshot_backup:
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
164164
#docker_mode: True # optional, use docker exec to run pg_dump commands inside docker container
165165
#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
166+
#db_user: mypg1user # optional, user to connect to postgresql inside docker container, by default current system user is used
166167
- type: MONGODB_SSH # dump mongodb over ssh, then rsync dump dir over ssh
167168
data:
168169
- ALL # special meaning, expands to all databases available

rsnapshot_backup/update_config.sls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ rsnapshot_backup_yaml:
288288
{%- if "docker_container" in host_backups_item %}
289289
docker_container: {{ host_backups_item["docker_container"] }}
290290
{%- endif %}
291+
#
292+
{%- if "db_user" in host_backups_item %}
293+
db_user: {{ host_backups_item["db_user"] }}
294+
{%- endif %}
291295
# Per backup host item is higher priority than per backup item
292296
{%- if "rsnapshot_prefix_cmd" in backup %}
293297
rsnapshot_prefix_cmd: {{ backup["rsnapshot_prefix_cmd"] }}

0 commit comments

Comments
 (0)