Skip to content

Instantly share code, notes, and snippets.

@dhamaniasad
Created August 2, 2015 22:07
Show Gist options
  • Save dhamaniasad/95f7d03b46a9c731f476 to your computer and use it in GitHub Desktop.
Save dhamaniasad/95f7d03b46a9c731f476 to your computer and use it in GitHub Desktop.
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