Generate pg_dumpall -g (--globals-only) compressed by pipe Script makes purge of old generation automatically You can also choose: