For on premise installation file documents path are define by developer. So accordingly you can take a backup of that location.
https://www.postgresqltutorial.com/postgresql-administration/postgresql-backup-database/
https://www.postgresql.org/docs/8.1/backup.html