瀏覽代碼

backup postgresql db handling

master
父節點
當前提交
3ba2dcbb78
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      tasks/backup.yaml

+ 7
- 0
tasks/backup.yaml 查看文件

@@ -17,3 +17,10 @@
> "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/database.mysql"
args:
stdin: "{{nextcloud_database_pass}}"
when: nextcloud_database_type == "mysql"

- name: drop postgresql database
shell: sudo -u postgres pg_dump -O
> "{{nextcloud_backup_directory}}/{{_nextcloud_actual_version}}/database.pgsql"
delegate_to: "{{ (nextcloud_database_host != 'localhost') | ternary(nextcloud_database_host,inventory_hostname) }}"
when: nextcloud_database_type == "postgresql"

Loading…
取消
儲存