Follow this blog for 9.6 https://edwardsamuel.wordpress.com/2016/04/28/set-up-postgresql-9-5-master-slave-replication-using-repmgr/
Keep replication config separate as explained here.
While cloning slave use following:
| # Fix borken python links in all venv | |
| cd ~/.virtualenvs | |
| for i in `workon` | |
| do | |
| if [ $(find $i/ -type l | tail -n 1 | grep "python3") ]; then | |
| echo "$i python3" | |
| find $i/ -type l -delete | |
| virtualenv $i --python=python3 |
| # -*- coding: utf-8 -*- | |
| """ | |
| move_google_datastore | |
| Move google datastore data to different project / different account. | |
| :license: MIT | |
| """ | |
| from google.cloud import datastore | |
| from google.cloud.datastore.entity import Entity |
Follow this blog for 9.6 https://edwardsamuel.wordpress.com/2016/04/28/set-up-postgresql-9-5-master-slave-replication-using-repmgr/
Keep replication config separate as explained here.
While cloning slave use following:
| #!/bin/bash | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 options | |
| This script set ownership for all table, sequence and views for a given database | |
| Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Jinja2 static site renderer using Flask | |
| @author Tarun Bhardwaj | |
| @license FreeBSD Licence | |
| """ | |
| from flask import Flask, abort, render_template | |
| from jinja2 import TemplateNotFound |
| #!/usr/bin/env python | |
| """ tryton_shell: A dirty shell for Tryton to quickly interact with it | |
| usage: tryton_shell.py [-h] --config CONFIG --database DATABASE | |
| arguments: | |
| --config CONFIG Tryton config file. | |
| --database DATABASE Tryton database. | |
| #!/usr/bin/env python | |
| ''' | |
| Install package from .travis.yml | |
| usage: travis_setup.py | |
| @author Tarun Bhardwaj | |
| @license FreeBSD Licence | |
| ''' |
| /* | |
| Run on https://www.openerp.com/partners/directory/ | |
| */ | |
| var countries = Array(); | |
| $(".oe_countries ul li a").each(function(){ | |
| if ($(this).attr("href") != undefined) | |
| countries.push({ | |
| "Link": $(this).attr("href"), | |
| "Name": $(this).html(), |