parent
9304c2a1e5
commit
b1ca10dbba
10 changed files with 37 additions and 11 deletions
@ -0,0 +1,3 @@ |
|||||||
|
--- |
||||||
|
|
||||||
|
docker_compose_version: 1.25.5 |
@ -0,0 +1,10 @@ |
|||||||
|
--- |
||||||
|
|
||||||
|
- name: Install docker-compose |
||||||
|
get_url: |
||||||
|
url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64 |
||||||
|
dest: /usr/local/bin/docker-compose |
||||||
|
mode: 0755 |
||||||
|
environment: |
||||||
|
- https_proxy: "{{ system_proxy | default('') }}" |
||||||
|
tags: docker |
@ -1,9 +1,12 @@ |
|||||||
#!/bin/sh |
#!/bin/sh |
||||||
|
|
||||||
for DB in {{ seafile_db_ccnet }} {{ seafile_db_seafile }} {{ seafile_db_seahub }}; do |
for DB in {{ seafile_db_ccnet }} {{ seafile_db_seafile }} {{ seafile_db_seahub }}; do |
||||||
/usr/bin/mysqldump --user={{ seafile_db_user }} \ |
/usr/bin/mysqldump \ |
||||||
--password={{ seafile_db_pass }} \ |
--quick --single-transaction \ |
||||||
--host={{ seafile_db_server }} \ |
{% if seafile_db_server not in ['127.0.0.1', 'localhost'] %} |
||||||
--quick --single-transaction \ |
--user='{{ seafile_db_user }}' \ |
||||||
--add-drop-table $DB | zstd -T0 -c > {{ seafile_data_dir }}/backup/$DB.sql.zst |
--password='{{ seafile_db_pass }}' \ |
||||||
|
--host={{ seafile_db_server }} \ |
||||||
|
{% endif %} |
||||||
|
--add-drop-table $DB | zstd -T0 -c > {{ seafile_root_dir }}/backup/$DB.sql.zst |
||||||
done |
done |
||||||
|
@ -1,3 +1,3 @@ |
|||||||
#!/bin/sh |
#!/bin/sh |
||||||
|
|
||||||
rm -f {{ seafile_data_dir }}/backup/* |
rm -f {{ seafile_root_dir }}/backup/* |
||||||
|
Loading…
Reference in new issue