HENGSHI SENSE Backup and Migration Operation Guide
The scripts required for this guide can be downloaded from the appendix below.
Backup
- Create the backup folder BACKUP_DIR, and copy sense-backup.sh, sense-restore.sh into this folder.
- Configure the following variables in backup.sh: [HS_HOME, PG_USR, PG_PWD, PG_HOST, PG_PORT].
- Execute
./backup.sh
Copy all files in this directory to the target machine
cd ..
rsync -avzP BACKUP_DIR $remote:/op/
Migration
- Install hengshi, and run bin/hengshi-sense-bin init all.
- Start the database
bin/hengshi-sense-bin start metadb
bin/hengshi-sense-bin start engine
- Enter the BACKUP_DIR folder.
- Configure the following variables in restore.sh: [HS_HOME, PG_USR, PG_PWD, PG_HOST, PG_PORT].
- 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
- sense-backup.sh
- sense-restore.sh