Page tree
Skip to end of metadata
Go to start of metadata

1. Login to the Controller box as the Diyotta user.

Note: If the database where the backup is being restored is currently in use by a Controller instance then, first shutdown the Controller by following the instruction in Stopping Diyotta Controller.

2. If the PostgreSQL database is not running then, start it using the following command

  • Embedded metadata

$DI_HOME/server/pgsql/startdb.sh

  • External metadata
<postgres installation folder>/postgres/bin/startdb.sh

Note: To verify the status of postgreSQL, connect to postgreSQL database using ./psql -p <db port> -d <db name> -U <db username> . psql command is available in the above mentioned "bin" folder.

2. Connect to the PostgreSQL server and drop the existing direp schema from the metadata database

cd $DI_HOME/server/pgsql/bin

./psql -p <db port> -d <metadata db name> -U <db username> -c "drop schema direp cascade;"

3. Run the following restore command. The backups taken as part of upgrade are placed by default in $DI_HOME/backups. This path can be overridden using environment variable DI_BACKUP. So, make sure the backup file is picked from right folder.

$DI_HOME/bin/pgrestore.sh –f <<backup folder>>/direpdb_<id>_<dt>.backup.gz

Note: The file direpdb_<id>_<dt>.backup.gz is the format in which the metadata backup is taken during upgrade. Here <id> is the version id of controller & <dt> is a timestamp when backup file generated.

4. Stop PostgreSQL database using the following command

  • Embedded metadata

$DI_HOME/server/pgsql/stopdb.sh

  • External metadata
<postgres installation folder>/postgres/bin/stopdb.sh

5. Start the PostgreSQL database.

  • Embedded metadata 
    Note: This will be started as part of Controller startup. If need be the startup command below can be used.

$DI_HOME/server/pgsql/startdb.sh

  • External metadata
<postgres installation folder>/postgres/bin/startdb.sh


  • No labels