Backup Hengshi Data

Set the PATH_TO_BACKUP_FOLDER variable to your backup directory. By executing the following commands, a backup file named backup.xx-xx-xx_xx:xx:xx.tar.gz will be created in $PATH_TO_BACKUP_FOLDER (the script will keep the 3 most recent files):

PATH_TO_BACKUP_FOLDER=/xxx
bin/dbbackup.sh -m metadb -p $PATH_TO_BACKUP_FOLDER

Restore Hengshi Data

  • Select a backup file and perform the following operations to restore data:
PATH_TO_BACKUP_FOLDER=/xxx
bin/hengshi-sense-bin stop all
mv pg_data pg_data.old
bin/hengshi-sense-bin init metadb
bin/dbrestore.sh -m metadb -r $PATH_TO_BACKUP_FOLDER/backup.xx-xx-xx_xx:xx:xx.tar.gz