Add playbooks to manually backup/restore IPA (stg)
This is to be able to restore things to a clean slate when we test the fas2ipa data migration script. Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
2cc7c82fb2
commit
750dc6da45
2 changed files with 21 additions and 0 deletions
12
playbooks/manual/noggin-deployment/create-full-backup.yml
Normal file
12
playbooks/manual/noggin-deployment/create-full-backup.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
- name: backup IPA data for testing
|
||||
hosts: ipa_stg
|
||||
#vars_files:
|
||||
# - /srv/web/infra/ansible/vars/global.yml
|
||||
# - "/srv/private/ansible/vars.yml"
|
||||
# - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
tasks:
|
||||
- name: create backup of FreeIPA server data
|
||||
command: ipa-backup
|
||||
- name: make the latest backup available under a fixed name
|
||||
chdir: /var/lib/ipa/backup
|
||||
shell: ln -snf $(ls -1t ipa-full* | head -n 1) ipa-full-latest
|
|
@ -0,0 +1,9 @@
|
|||
- name: restore latest IPA backup for testing
|
||||
hosts: ipa_stg
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
# - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
tasks:
|
||||
- name: restore latest backup of FreeIPA server data
|
||||
command: ipa-restore /var/lib/ipa/backup/ipa-full-latest -p {{ ipa_admin_password }}
|
Loading…
Add table
Add a link
Reference in a new issue