If you want to keep your data safe and sound, create backups to avoid potential data loss.
Backups contain all data that is stored in the directory /opt/hw-bw
, including personal Platform settings in user.ini
file.
Note: backups are automatically created during the installation of platform updates.
To create platform backup, perform the following steps:
Run the command (root privileges required):
/opt/hw-bw/bin/full-backup
Enter Y
on N
(Yes
or No
) to confirm backup creation;
/opt/hw-bw_backup
.Note: old backups will be deleted, if the limit of the stored backups is exceeded.
Additional options:
--force / -f
- make a backup without an additional question;--help / -h
- brief documentation about backup options;backup_depth
- number of the stored backups (integer, by default is 3). If it is not set, the value is taken from the product.backup.depth
option in the user.ini
file.To change the number of backups stored on the Platform:
/opt/hw-bw/config/user.ini
(root privileges required);Add the following line to the [main]
section and specify number of backups (integer):
[main]
product.backup.depth = 3
To restore data from backup, perform the following steps:
Note: if you restore data from backup on a new (clean) virtual machine, start from the 3rd step. First two steps are needed if you restore data on the virtual machine with Platform installed.
Stop the Platform if it is running (root privileges required):
systemctl stop hw-bw
Make a backup of the current Platform state (optional step):
mv /opt/hw-bw /path/to/your/safe/place
In the directory /opt/hw-bw_backup
, find Platform backup you want to restore and copy it to any directory on the virtual machine;
Unpack the backup to the directory /opt/hw-bw
, example:
mkdir -p /opt/hw-bw
tar -xzf /opt/hw-bw_backup/backup_2022.09.21T10.31.32Z.tgz -C /opt/hw-bw
Upload Platform installation files of the version that was installed at the moment when you created a backup to the server. To check Platform version, run the command:
/opt/hw-bw/bin/get-config-value product.version
Note: if you don't have needed Platform version, contact HexWay team.
Unpack Platform installation files:
bash ./install_hw_bw_en-US_<version>.run --noexec --target /new/directory
Load images of the installation files:
cd /new/directory
bash load-images.sh
Restore daemon systemctl
configurations:
systemctl link /opt/hw-bw/systemd/hw-bw.service
systemctl enable hw-bw
systemctl daemon-reload
If you restore backup on a new (clean) virtual machine, you should also add a group and user:
. /opt/hw-bw/bin/common-functions.sh && create_user_group
Start the Platform:
systemctl start hw-bw