I have two servers with same version of postgres(9.4). I would like to make fast clone database (backup and restore). As i understand "create database xxx from template" is fastest way to make copy of database.
How can i do cloning from one server to another? May i use dblink for this task and how?
I know solution which use pg_dump and pg_restore(psql), but i think it is too slow for me. For example, 5gb database was restored around 12 minutes(with -j option in pg_restore) and backuped around 2 minutes.
Another way, may be, Can i copy some postgres files(/var/lib/postgresql/*) to another server, and run postgres there? How to find this files?