Skip to content

Commit

Permalink
Fix blobstore restore script when splitted blobstore is on (#245)
Browse files Browse the repository at this point in the history
* Digest splitted blobstore list earlier

Collateral dammage of #241. When split blobstore is on
blobstore list was not valorised early enough
and blobstore restore script was buggy.

* Fix white spaces
  • Loading branch information
zeitounator authored Feb 14, 2020
1 parent 3f00097 commit 63f74b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
- include_tasks: nexus_purge.yml
when: nexus_purge | default(false) | bool

- name: "Digest splited blob list var"
include_vars: blob_vars.yml
when: nexus_blob_split | bool

- import_tasks: nexus_install.yml

- include_tasks: httpd_reverse_proxy_config.yml
Expand Down Expand Up @@ -93,10 +97,6 @@
{%- endfor -%}
{{ result | to_json | from_json }}
- name: "Digest splited blob list var"
include_vars: blob_vars.yml
when: nexus_blob_split | bool

- name: Create/Check blobstores
when: nexus_restore_point is undefined
block:
Expand Down
4 changes: 2 additions & 2 deletions templates/nexus-blob-restore.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ else
rm -rf ${data_dir}/db/*
rm -rf ${data_dir}/blobs/*
sudo -u {{ nexus_os_user }} cp ${backup_dir}/${blob_dir}/db/* ${db_restore_dir}
{% for item in nexus_blobstores %}
{% for item in nexus_blobstores %}
sudo -u {{ nexus_os_user }} cp -r ${backup_dir}/${blob_dir}/{{ item.name }} ${data_dir}/blobs/
{% endfor %}
{% endfor %}
sudo -u {{ nexus_os_user }} cp -r ${backup_dir}/${blob_dir}/default ${data_dir}/blobs/
fi

0 comments on commit 63f74b6

Please sign in to comment.