How to get a backup of a PostgreSQL Geodatabase with versioning
Here is the web help file from ArcGIS to take backup of PostGreSQL geodatabase:
https://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-postgresql/backups-postgresql.htm
It is better to follow PostgreSQL help to do backup and restore of database.
Thanks,
Biraja