Skip to content

Steps to Take Backup of CLIxDashboard Database

parthasarathiE edited this page Jan 2, 2020 · 4 revisions

To take backup from current DB and restore it back to new version of DB:

This page describes steps to take backup of all data from postgres database associated with dashbaord.

  1. login into the server on which clix_dashboard_backend docker is running
  2. move to 'CLIxDashboard' folder
  3. To take Backup:
    • docker exec -t clix_dashboard_postgres pg_dumpall -c -U admin_clixdata > SchoolDashboardDump_date +%d-%m-%Y"_"%H_%M_%S.sql
  4. To restore data into DB:
    • cat SchoolDashboardDump_<some_datetime>.sql | docker exec -i clix_dashboard_postgres psql -d clix_dashboard_db -U admin_clixdata

Note: After restoring data, we need to create logins using steps outlined here. Reference: GitHub Link