[Trick] How do Backup in PostreSQL

Postgres have the tool pg_dump the which is used for do backups.

$ pg_dump -i -F c -b -v -f backup_name.bk database_name

add -s, –schema-only: for dump only the schema, no data.

Create the database if no existing:

$ createdb --locale=en_US.UTF-8 --owner=postgres -W database_name

Restore backup:

$ pg_restore -i -d database_name -v backup_name.bk



install vim with support for python 2.7/3.X and Lua

Last update: 29/03/2018

* remove vim:

$ sudo apt update
$ sudo apt purge $(dpkg --get-selections|grep -i vim|cut -f1)

* install the dependencies:

$ sudo apt update && sudo apt upgrade --yes
$ sudo apt install build-essential
$ sudo apt install python-dev python3-dev git
$ sudo apt-get install libncurses-dev libperl-dev ruby-dev liblua5.3-dev

Sigue leyendo