This is an old revision of the document!
6 Backups
Starting with version 2.25.9, the function of backup DB and FS has appeared. By enabling the function, you can configure the frequency of copying, storage duration, as well as export via SCP to a remote storage.
Move to the DB and FS settings section, open the Administrator menu item, section «Backup settings».
Configuration
Enable DB backup
To enable DB backup, select "Enabled".
Specify the following settings
- BACKUP_DB_ENABLED - enable DB backup. (Default value is Disabled)
- BACKUP_DB_INTERVAL_HOURS - backup DB time interval, hours. (Default value is 24)
- BACKUP_DB_PATH - backup DB save path. (Default path is /var/dpiui2_backup/db)
- BACKUP_DB_DELETE_OLD_INTERVAL - delete old DB backups interval, hours. (Default value is 0)
Enable FS backup
To enable FS backup, select "Enabled".
Specify the following settings
- BACKUP_FS_ENABLED - enable FS backup. (Default value is Disabled)
- BACKUP_FS_INTERVAL_HOURS - backup FS time interval, hours. (Default value is 24)
- BACKUP_FS_PATH - backup FS save path. (Default path is /var/dpiui2_backup/fs)
- BACKUP_FS_DELETE_OLD_INTERVAL - delete old FS backups interval, hours. (Default value is 0)
Remote server for storing backups settings
- BACKUP_SCP_HOST - remote server host for storing backups.
- BACKUP_SCP_PORT - remote server port for storing backups.
- BACKUP_SCP_USER - backup storage username.
- BACKUP_SCP_PASSWORD - backup storage password.
- BACKUP_SCP_DB_PATH - backup DB remote path. (Default path is /var/dpiui2_backup/db)
- BACKUP_SCP_FS_PATH - backup FS remote path. (Default path is /var/dpiui2_backup/fs)
Saving сhanges
Data recovery
To restore data from Backup, make sure that the server is installed and running installed and running dpiui2.
Restoring DB from backup
To restore a database from a remote storage, run the following command in the terminal of the server where dpiui2 is installed:
gunzip < dpiui2_db_backup.X.sql.gz | mysql -u root -p dpiui2
Restoring FS from backup
To restore files from a backup, run the following command:
sh /var/www/html/dpiui2/backend/app_bash/vas_codebase/restore_backup_fs.sh dpiui2 dpiui2_fs_backup.X.tar.gz