Faster Way To Dump And Restore In Postgres

    In general, people find dumping their whole databases in sever by pg_dumpall easily. But it takes too long since this tool is not utilized for using resources efficiently. Thus, it's essential to uncompress and parallelize jobs while taking dumps in PostgreSQL databases via pg_dump. Example command:

             pg_dump -Z0 -j 8 -Fd mydb -f dump_folder

            -Z0 means "no compress" and -j 8 means use 8 cores.

When using pg_restore, similar approach is applied to maximize performance.

             pg_restore -Fd -O -j 8  -d mydb dump_folder
            

Comments

Popular posts from this blog

Oracle Database Upgrade With OPatch Tool (RHEL/Centos/OEL)

POSTGRESQL UPGRADE WITH PG_UPGRADE UTILITY IN RHEL/CENTOS/OEL

Backup Recovery Scenarios