Setting up New DEV machine with Omakub
Turn a fresh Ubuntu installation into a fully-configured, beautiful, and modern web development system by running a single command. That’s the one-line pitch for Omakub. No need to write bespoke configs for every essential tool just to get started or to be up on all the latest command-line tools. Omakub is an opinionated take on what Linux can be at its best.
We are going to use [omakub](https://omakub.org/) for that
wget -qO- https://omakub.org/install | bash
This is the one line command that will setup bunch of applications that you can find here in the official docs: [omakub](https://omakub.org/).
PostgreSQL setup
If you are using PostgreSQL for your local development database, omakub will install that inside Docker container. But what if you want to restore this database with the db dump file that you already have, here are the steps I took to setup my machine.
- Because postgres docker localhost:5432 host and port are exposed to client’s machine, we are able to run following command to access postgresql console
psql -U postgres -h localhost
psql (16.4 (Ubuntu 16.4-0ubuntu0.24.04.2), server 16.5 (Debian 16.5-1.pgdg120+1))
Type "help" for help.
postgres=#
Now lets say your ubuntu machine’s username is john
we will create database and role to match this username.
postgres=# CREATE ROLE john with LOGIN;
CREATE ROLE
postgres=# ALTER ROLE john with superuser;
ALTER ROLE
postgres=# create database john with owner = john;
CREATE DATABASE
postgres=#\q
Add superuser
and login
roles to this user, you can also provide password to this user if you want.
Now lets say your dump file is located in ~/Downloads/latest.dump
we can restore this file with following command:
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U john -d my-db ~/Downloads/latest.dump
And your pg restore should start.