To dump mir database : pg_dumplo -a -d -s /dumpdir/dir pg_dump -c -D -f /dumpdir/.sql this generates a dir with all blobs and a sql-file with all data. To restore the database: psql < .sql pgdump_lo -i -d -s /dumpdir/dir Every once in a while (or make a script) postgresql database should be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE Every once in a while (or make a script) postgresql database should be "cleaned". See postgresql docs for commands VACUUM and VACUUM ANALYZE