TL;DR
Install Postgres 10, and then:
sudo pg_dropcluster 10 main --stop
sudo pg_upgradecluster 9.6 main
sudo pg_dropcluster 9.6 main
kill $(ps aux | grep 'odoo' | awk '{print $2}') |
TL;DR
Install Postgres 10, and then:
sudo pg_dropcluster 10 main --stop
sudo pg_upgradecluster 9.6 main
sudo pg_dropcluster 9.6 main
#!/bin/sh | |
#%# family=manual | |
#%# capabilities=autoconf suggest | |
# Munin plugin for transactions/minute | |
case $1 in | |
autoconf) | |
exit 0 | |
;; | |
suggest) |
You can check here for getting the latest version. Change the wget url to download newer versions.
############################################################################## | |
# | |
# Author: Miku Laitinen / Avoin.Systems | |
# Copyright 2019 Avoin.Systems | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Affero General Public License as | |
# published by the Free Software Foundation, either version 3 of the | |
# License, or (at your option) any later version. | |
# |
My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.
To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)
Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
#!/usr/bin/env python2 | |
import os | |
import sys | |
import StringIO | |
import psycopg2 | |
import psycopg2.extensions | |
from optparse import OptionParser | |
from ConfigParser import SafeConfigParser | |
try: |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
mv wkhtmltox/bin/wkhtmlto* /usr/bin/ | |
ln -nfs /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf |
# List databases | |
sudo su postgres | |
psql | |
\list | |
# Create a compressed backup | |
sudo su postgres | |
pg_dump -Fc <database_name> > <file> | |
# Example |