Last active
November 16, 2015 01:11
-
-
Save jkburges/929bf4fc9aae2d3993c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run as: | |
# curl -s "<url to this>" | sudo time bash | |
# As root... | |
apt-get -y install postgresql-9.4-postgis-2.1 | |
service postgresql stop | |
chmod 777 /var/log/postgresql | |
pg_dropcluster --stop 9.4 main | |
# This first attempt fails on 2-aws-syd copy, but this may be due to the snapshot being inconsistent? | |
# If it works skip step below... | |
pg_upgradecluster -k -v 9.4 -m upgrade 9.3 main /mnt/db/1/main.9.4 | |
# Skip if previous step works | |
rm /mnt/db/1/main/*.conf && pg_upgradecluster -k -v 9.4 -m upgrade 9.3 main /mnt/db/1/main.9.4 | |
chmod 775 /var/log/postgresql | |
#pg_ctlcluster 9.4 main stop | |
pg_dropcluster 9.3 main | |
# Check /etc/postgresql config - to see if dropcluser will run | |
# mv /mnt/db/1/main /mnt/db/1/main.9.3 | |
#mv /mnt/db/1/main.9.4 /mnt/db/1/main | |
echo "Now run chef" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment