I have a Tomcat web server running a web application that uses PostgreSQL. All the manual process of the organization are automated through the web application with persistence layer as Hibernate. I would like to provide a backup and restore option for the user.
Backup would somehow get all of the data/schema (maybe not schema) from the DB and zip it and send it to the user through the web-app to allow them to save the backup on their local machine. They could then select this backup file to restore the DB to the state that it was when the backup was taken.
We're using Tomcat container, Spring+Hibernate with PostgreSql.
How can this be done?