HENGSHI SENSE Backup and Migration Operation Guide

The scripts required for this guide can be downloaded from the appendix below.

Backup

  1. Create the backup folder BACKUP_DIR, and copy sense-backup.sh, sense-restore.sh into this folder.
  2. Configure the following variables in backup.sh: [HS_HOME, PG_USR, PG_PWD, PG_HOST, PG_PORT].
  3. Execute
./backup.sh

Copy all files in this directory to the target machine

cd ..
rsync -avzP BACKUP_DIR $remote:/op/

Migration

  1. Install hengshi, and run bin/hengshi-sense-bin init all.
  2. Start the database
bin/hengshi-sense-bin start metadb
bin/hengshi-sense-bin start engine
  1. Enter the BACKUP_DIR folder.
  2. Configure the following variables in restore.sh: [HS_HOME, PG_USR, PG_PWD, PG_HOST, PG_PORT].
  3. Execute
./restore.sh

Start hengshi

bin/hengshi-sense-bin start hengshi

Update License

As the hardware information changes after the migration, the License becomes invalid and needs to be reapplied.

Appendix

  1. sense-backup.sh
  2. sense-restore.sh