Created
August 2, 2015 22:07
-
-
Save dhamaniasad/95f7d03b46a9c731f476 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
service postgresql stop # Stop the server first | |
rm -rf /var/lib/postgresql/9.4/main # Remove the data directory | |
envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-fetch /var/lib/postgresql/9.4/main LATEST # Fetch the backup | |
restore_command = '/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e wal-fetch %f %p' # Create recovery.conf inside data directory | |
service postgresql start # Start the server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment