Name: ansible-pg-wale
Owner: npm
Description: Configure WAL-E S3 backups for Postgres
Created: 2015-05-05 20:34:34.0
Updated: 2018-04-06 14:08:06.0
Pushed: 2018-03-27 15:51:18.0
Size: 6
Language: null
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Configures the WAL-E backup tool for Postgres.
This allows you to quickly recover your database from an S3 bucket.
Force the WAL archives to swap, so that you can ensure that your backup works.
CT pg_switch_xlog();
Suppose you've corrupted or deleted your postgres data directory:
sudo service postgresql stop
.sudo rm -rf /mnt/postgresql/*
recovery.example
, there's a command here for downloading a base
backup of the database.recovery.example
to recovery.conf
. this file directs postgres to perform recovery.sudo service postgresql start
This should almost never happen, and is a risky operation.
if you ever find yourself in a sticky situation where you are unable to recover fully with WAL-E, and you have a partial backup of your data directory. You have the nuclear option of resetting your log directory.
/lib/postgresql/9.3/bin/pg_resetxlog /mnt/postgresql/