gltn / stdm

STDM is a free and open source pro-poor land recordation system based on QGIS, PostgreSQL and PostGIS.
http://stdm.gltn.net/
GNU General Public License v2.0
30 stars 30 forks source link

Add Configuration File and Database Backup Interface #491

Closed pgathogo closed 5 months ago

pgathogo commented 2 years ago

Add an interface in the Options window that allows users to do a backup for the current configuration file and database. The backup files should be copied to a folder set by the user when they click the Run Backup button.

image

gkahiu commented 2 years ago

Thanks! Great addition.

Some comments:

  1. Could we remove this from the configuration and have it as a separate module/icon since its more of a utility rather than a desktop configuration/option?
  2. What files exactly does it copy to the folder? Is it just the current profile or all profiles? For the backup, is it for the current profile tables (plus dependencies) or the full DB backup? Is there a benefit of zipping them especially if it will save on space?
  3. Could we add a small metadata file together with the other files in JSON or XML format? This will just help to provide a snapshot of what the backup contains so that other users or systems (e.g. STDM Web) can know what the backup contains. Something like:
    {
    "configuration": {
    "file_name": "configuration.stc",
    "profiles": [
      "kopgt",
      "informal_settlement"
    ]
    },
    "database": {
    "backup": "all_profiles.bak"
    },
    "created_on": "dd-MM-yyyy HH:mm:ss"
    }
pgathogo commented 2 years ago

@gkahiu thank you.

Comments 1 & 3 will be factored into the development. Comment 2 - The utility copies the current configuration file (with all the profiles), and for the database, it is a full DB backup for the current database. As suggested and even for the future enhancement of this utility, we can package this backup as a zip file.

pgathogo commented 5 months ago

This feature is now fully available in STDM 1.8.