Skip to content

Commit

Permalink
configure staging to take backups. backups are stored to a separate d…
Browse files Browse the repository at this point in the history
…irectory from production
  • Loading branch information
rikukissa committed Apr 29, 2024
1 parent 5be1dd4 commit 411c3c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion infrastructure/server-setup/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ ansible_python_interpreter: /usr/bin/python3
encrypt_data: False
swap_file_path: /swapfile
swap_file_size_mb: 8000
external_backup_server_remote_directory: /home/backup/backups
external_backup_server_user: 'backup'
11 changes: 6 additions & 5 deletions infrastructure/server-setup/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ all:
# This configuration variable blocks all access to the server, including SSH, except from the IP addresses specified below.
# This should always be set when configuring a production server if there is no other firewall in front of the server.
# SSH and other services should never be exposed to the public internet.
only_allow_access_from_addresses:
- 165.22.110.53
# Enable backups
enable_backups: true
external_backup_server_remote_directory: /home/backup/backups
# external_backup_server_ssh_port: Defined in --extra-vars by the provisioning pipeline
# external_backup_server_ip: Defined in --extra-vars by the provisioning pipeline
only_allow_access_from_addresses:
- 165.22.110.53
users:
# If you need to remove access from someone, do not remove them from this list, but instead set their state: absent
- name: riku
Expand Down Expand Up @@ -50,6 +52,5 @@ backups:
hosts:
farajaland-qa:
ansible_host: '165.22.110.53'
vars:
# @todo how many days to store backups for?
amount_of_backups_to_keep: 3
# @todo how many days to store backups for?
amount_of_backups_to_keep: 3
9 changes: 5 additions & 4 deletions infrastructure/server-setup/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ all:
# SSH and other services should never be exposed to the public internet.
only_allow_access_from_addresses:
- 165.22.110.53
enable_backups: false
# Enable backups but write them to a different location from where production writes them
enable_backups: true
external_backup_server_remote_directory: /home/backup/staging-backups
periodic_restore_from_backup: true
# external_backup_server_ssh_port: Defined in --extra-vars by the provisioning pipeline
# external_backup_server_ip: Defined in --extra-vars by the provisioning pipeline
Expand Down Expand Up @@ -52,6 +54,5 @@ backups:
hosts:
farajaland-qa:
ansible_host: '165.22.110.53'
vars:
# @todo how many days to store backups for?
amount_of_backups_to_keep: 3
# @todo how many days to store backups for?
amount_of_backups_to_keep: 3

0 comments on commit 411c3c7

Please sign in to comment.