You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
703 B
24 lines
703 B
3 years ago
|
---
|
||
|
|
||
|
- name: Create the archive dir
|
||
|
file: path={{ sftpgo_root_dir }}/archives/{{ sftpgo_current_version }} state=directory
|
||
|
tags: sftpgo
|
||
|
|
||
|
- name: Backup previous version
|
||
|
copy: src={{ sftpgo_root_dir }}/app dest={{ sftpgo_root_dir }}/archives/{{ sftpgo_current_version }}/ remote_src=True
|
||
|
tags: sftpgo
|
||
|
|
||
|
- name: Archive the database
|
||
|
mysql_db:
|
||
|
state: dump
|
||
|
name: "{{ sftpgo_db_name }}"
|
||
|
target: "{{ sftpgo_root_dir }}/archives/{{ sftpgo_current_version }}/{{ sftpgo_db_name }}.sql.xz"
|
||
|
login_host: "{{ sftpgo_db_server }}"
|
||
|
login_user: sqladmin
|
||
|
login_password: "{{ mysql_admin_pass }}"
|
||
|
quick: True
|
||
|
single_transaction: True
|
||
|
environment:
|
||
|
XZ_OPT: -T0
|
||
|
tags: sftpgo
|