Skip to content

Instantly share code, notes, and snippets.

View brutasse's full-sized avatar
🤌

Bruno Renié brutasse

🤌
View GitHub Profile

Replication

Sync process is:

  • make a base backup
  • catch up with changes that happened during the base backup using master's WAL files
  • stream

Make sure master's wal_keep_segments is set to a high enough value to allow tracking all changes happening during the base backup. Restart needed when changing this.

sudo apt-get -y install python-virtualenv libxslt1-dev libxml2-dev python-virtualenv-tools
export VERSION=`date +"%Y.%m.%d"`.$BUILD_NUMBER
mkdir -p build/usr/share/python
virtualenv build/usr/share/python/sentry
build/usr/share/python/sentry/bin/pip install -U pip wheel distribute
build/usr/share/python/sentry/bin/pip uninstall -y distribute
build/usr/share/python/sentry/bin/pip install sentry[mysql] dj-database-url hiredis dj-redis-url django-redis-cache
import os
import subprocess
base = [f.rsplit('-', 3)[0] for f in os.listdir('..') if f.endswith('.xz')]
downloaded = {'sh'}
def clean(p):
return p.split('>=')[0].split('=')[0]