Skip to content

Commit

Permalink
update - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
superstes committed Oct 27, 2021
1 parent f93eeff commit 7c8076c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions setup/roles/update/tasks/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- name: GA | Update | Backup | Backing up directories
ansible.builtin.shell:
cmd: "tar cf - {{ item.src }} | xz -7 > {{ item.dst }}"
cmd: "tar cf - {{ item.src }} | xz -7 -T{{ ga_update_cores }} > {{ item.dst }}"
warn: false
with_items:
- {src: "{{ ga_update_path_core }}", dst: "{{ ga_update_path_backup }}/core.tar.xz"}
Expand All @@ -20,7 +20,7 @@

- name: GA | Update | Backup | Backing up database
ansible.builtin.shell: "mysqldump --defaults-file={{ ga_update_path_web }}/{{ ga_db_config }} --single-transaction --force {{ ga_sql_db }} |
xz -7 > {{ ga_update_path_backup }}/db.sql.xz"
xz -7 -T{{ ga_update_cores }} > {{ ga_update_path_backup }}/db.sql.xz"

- name: GA | Update | Backup | Setting privileges on backup-files
ansible.builtin.file:
Expand Down
5 changes: 5 additions & 0 deletions setup/roles/update/tasks/preparations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@
ga_update_release_now: "{{ ga_raw_commit_release.stdout }}"
changed_when: false
when: ga_update_type == 'commit'

- name: GA | Update | Prep | Getting core-count to use for tasks
ansible.builtin.set_fact:
ga_update_cores: "{{ ansible_processor_cores - 1 }}"
changed_when: false
2 changes: 1 addition & 1 deletion setup/roles/update/tasks/restore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- name: GA | Update | Restore | Saving logs for debug reasons
ansible.builtin.shell:
cmd: "tar cf - {{ ga_update_path_log }} | xz -7 > {{ ga_update_path_backup }}/log_restore.tar.xz"
cmd: "tar cf - {{ ga_update_path_log }} | xz -7 -T{{ ga_update_cores }} > {{ ga_update_path_backup }}/log_restore.tar.xz"
warn: false

- name: GA | Update | Restore | Stopping core service
Expand Down

0 comments on commit 7c8076c

Please sign in to comment.