Skip to content

Commit

Permalink
Do not rsync postgres data because it can mess up the wal (#10)
Browse files Browse the repository at this point in the history
Do not rsync postgres data because it can mess up the wal. Rename script to reflect its usage more accurately
  • Loading branch information
hanchiang committed Aug 6, 2022
1 parent 06ae17b commit 37aa54f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Expand Up @@ -20,9 +20,6 @@
sudo chown -R postgres:postgres $postgres_path
sudo chmod 700 $postgres_path
fi
# IMPORTANT!!! Do not copy files if they already exist, otherwise postgres data will be overwritten
sudo rsync -av --ignore-existing /var/lib/postgresql/13/main/ $postgres_path
- debug: var=create_postgres_data_directory.stdout_lines
- debug: var=create_postgres_data_directory.stderr_lines
- name: Configure postgresql.conf
Expand Down
2 changes: 1 addition & 1 deletion instances/ansible/start.sh
Expand Up @@ -29,7 +29,7 @@ files=($(ls playbooks/*.yml))
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u $SSH_USER -i aws_ec2.yml --private-key $SSH_PRIVATE_KEY_PATH playbooks/setup-file-system.yml

# Copy postgres data to volume
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u $SSH_USER -i aws_ec2.yml --private-key $SSH_PRIVATE_KEY_PATH playbooks/copy-postgres-data.yml
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u $SSH_USER -i aws_ec2.yml --private-key $SSH_PRIVATE_KEY_PATH playbooks/postgres-data-directory.yml

# Configure ssl for nginx
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u $SSH_USER -i aws_ec2.yml --private-key $SSH_PRIVATE_KEY_PATH playbooks/nginx-https.yml
Expand Down

0 comments on commit 37aa54f

Please sign in to comment.