rebase last 5 commits
git rebase -i HEAD~5
git rebase --edit-todo
(drop)
git rebase --continue
git push --force origin master
worker_processes 2; | |
error_log /var/log/nginx/error.log info; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
init_by_lua ' | |
function split(inputstr, sep) |
Configuring the primary server | |
$ sudo -u postgres /usr/pgsql-9.5/bin/createuser -U postgres repuser -P -c 5 --replication | |
Create the archive directory | |
$ mkdir -p /var/lib/postgresql/9.5/main/mnt/server/archivedir | |
Edit pg_hba.conf | |
$ nano /etc/postgresql/9.5/main/pg_hba.conf | |
# Allow replication connections | |
host replication repuser ip_standby_server/32 md5 |
rebase last 5 commits
git rebase -i HEAD~5
git rebase --edit-todo
(drop)
git rebase --continue
git push --force origin master
pg_restore --verbose --clean --no-acl --no-owner -c -h db_host -U postgres -d db_name db_file.dump |
curl -H 'Content-Type: application/json' -XPUT 'http://localhost:9200/_settings' -d ' | |
{ | |
"index" : { | |
"number_of_replicas" : 0 | |
} | |
}' |
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
curl -w "@curl-format.txt" -o /dev/null -s http://www.aduanacol.com |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
Edit your pg_hba.conf and set connections on local to trust for the duration of the upgrade. | |
/usr/pgsql-9.5/bin/pg_upgrade --old-bindir=/usr/pgsql-9.4/bin/ --new-bindir=/usr/pgsql-9.5/bin/ --old-datadir=/var/lib/pgsql/9.4/data/ --new-datadir=/var/lib/pgsql/9.5/data/ |
sudo apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys <NO_PUBKEY> |