Skip to end of metadata
Go to start of metadata

It is important to have engage backups and restore the DB in case engage Postgres DB gest corrupted.

Step-by-step guide

  1. Make a backup:
    sudo /usr/local/sbin/engage-backup 

    (the backup will be saved by default under the /tmp directory)


  2. Run this command to drop the DB:
    sudo -u postgres /usr/bin/psql -d postgres -U postgres -c "drop database engage;"

  3. Run this command to recreate the DB:
    sudo -u postgres /usr/bin/psql -d postgres -U postgres -c "create database engage encoding="utf8" template="template0";"

  4. Restore the dump:

    sudo -u postgres /usr/bin/psql -d engage -U postgres -f /home/filewave/database.sql 

 

In case you get the error while you drop the database "ERROR:  database "engage" is being accessed by other users....." then run this command sudo service postgresql restart and right afterwards the drop database command.

Unzip the backup

 tar zxfv engage_2017-12-08T16-49-13Z.tar.gz 

If you have a fresh VM resp. a VM that there is no data but the DB is broken or and if you cannot import the CSV file

In this case just take a dump from a fresh VM and restore it to the VM with broken Engage DB.