PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • How to proceed?
  • Performing a backup
  • Performing a scheduled backup
  • Operations on the backups
  • How to proceed?
  • Performing a backup
  • Performing a scheduled backup
  • Operations on the backups
  • Remarks
  • Characteristics of the backup
  • Management of a procedure before and/or after
  • Managing a webhook
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
HFSQL Control Center: HFSQL Client/Server backups
HFSQL Client/ServerAvailable only with this kind of connection
Overview
The HFSQL Control Center is used to manage the backups of HFSQL Client/Server data files.
The backups can be:
  • full: in this case, all the selected elements (entire server, databases or files) are entirely saved. This backup is more secured because it is sufficient to restore the elements. It is longer to perform because everything is saved.
  • differential: in this case, only the differences in relation to a full backup are saved. This backup is faster to perform and less bulky. It must be stored with the full backup that corresponds to it.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
How to proceed?

Performing a backup

Remark: The backups performed according to this method are necessarily full backups. The differential backups can only be performed via scheduled backups.
To perform a backup:
  1. Select the HFSQL Client/Server server in the "HFSQL C/S" pane.
  2. Select the "Backups" tab.
  3. Click the "New backup" button. The wizard for creating a backup starts.
  4. Specify the content of the backup:
    • The entire content of the server.
    • A specific database.
    • A selection of databases and/or files.
  5. Specify whether the backup must contain the index files (index files with a NDX extension and full-text index files with a FTX extension). If the index files are not saved, the size of the backup will be reduced but the restore time will be longer. Remark: if the index files are not saved, the passwords of the files must be specified during the restore operation to allow their reindexing.
  6. Specify the backup directory. If this name corresponds to a relative path, the backup will be performed in the "Backup" subdirectory of the HFSQL server. The wizard is used to define a "backup" subdirectory ("Backups" by default). The date and the time (in "Year\Month\Day\Time-Minute" format) can be added to the name of the directory in order to easily identify the backup.
    Remark: The backups are performed in a numbered subdirectory ("backup\Backups\1" for example). Therefore, if several backups are performed, the corresponding files will not be overwritten by a new backup.
  7. Specify whether stored procedures must be started before or after the backup. If you choose to start a stored procedure, specify:
    • the name of the database containing the stored procedure to run,
    • the name of the set of procedures containing the stored procedure to run,
    • the name of the procedure to run.
  8. Specify whether you want to limit the number of backups stored on the server.
  9. Give a description to your backup and validate.
  10. The backup is automatically started. The progress of the backup can be monitored in the HFSQL Control Center.
Remark: A backup can also be performed from the "Backups" tab of a database selected in the TreeView on the left of the screen.

Performing a scheduled backup

To perform a scheduled backup:
  1. Select the HFSQL Client/Server server in the "HFSQL C/S" pane.
  2. Select the "Scheduled elements" tab.
  3. Click the "New" button and choose "New scheduled backup". The wizard for creating a backup starts.
  4. Specify the content of the backup:
    • The entire content of the server.
    • A specific database.
    • A selection of databases and/or files.
  5. Specify whether the backup must contain the index files (index files with a NDX extension and full-text index files with a FTX extension). If the index files are not saved, the size of the backup will be reduced but the restore time will be longer. Remark: if the index files are not saved, the passwords of the files must be specified during the restore operation to allow their reindexing.
  6. Choose a scheduling scenario among the preset scenarios. You can also choose a custom scheduling. In this case, the following planes will help you build the scheduling.
  7. Specify the backup directory. If this name corresponds to a relative path, the backup will be performed in the "Backup" subdirectory of the HFSQL server. The wizard is used to define a "backup" subdirectory ("Backups" by default). The date and the time (in "Year\Month\Day\Time-Minute" format) can be added to the name of the directory in order to easily identify the backup.
    Remark: The backups are performed in a numbered subdirectory ("backup\Backups\1" for example). Therefore, if several backups are performed, the corresponding files will not be overwritten by a new backup.
  8. Specify whether stored procedures must be started before or after the backup. If you choose to start a stored procedure, specify:
    • the name of the database containing the stored procedure to run,
    • the name of the set of procedures containing the stored procedure to run,
    • the name of the procedure to run.
  9. Specify whether you want to limit the number of backups stored on the server.
  10. Give a description to your backup and validate.
  11. The backup will be automatically started according to the specified scheduling. The progress of the backup can be monitored in the HFSQL Control Center.

Operations on the backups

The HFSQL Control Center allows you to handle the existing backups. You can:
  • Perform a backup.
  • Restart a backup.
  • Restore a backup.
  • Restore a backup found in a specific directory.
  • Delete a backup. To delete a backup, you must be a "Super user".
To perform these operations:
  1. Select the HFSQL Client/Server server in the TreeView on the left of the screen.
  2. Select the "Backups" tab.
  3. Select the backup to handle and click the button corresponding to the requested action.
How to proceed?

Performing a backup

Remark: The backups performed according to this method are necessarily full backups. The differential backups can only be performed via scheduled backups.
To perform a backup:
  1. Connect (if necessary) to a HFSQL server.
  2. Double-click the name of HFSQL server in the tree structure.
  3. The right section of Control Center displays a tab with the server name.
  4. Click the "Backups" tab.
  5. In the ribbon, in the "Backups" group, expand "New backup" and select "New hot backup". The wizard for creating a backup starts.
  6. Specify the content of the backup:
    • The entire content of the server.
    • A specific database.
    • A selection of databases and/or data files.
  7. Go to the next step of the wizard and specify the backup options:
    • whether the result of the backup must be compressed in a zip file.
    • whether the backup must contain the index files (NDX index files and FTX full-text index files). If the index files are not saved, the size of the backup will be reduced but the restore time will be longer. Remark: if the index files are not saved, the passwords of the files must be specified during the restore operation to allow their reindexing.
  8. Go to the next step of the wizard.
  9. Specify the backup location by specifying the backup directory. If this name corresponds to a relative path, the backup will be performed in the "Backup" subdirectory of the HFSQL server. The wizard is used to define a "backup" subdirectory ("Backups" by default). The date and the time (in "Year\Month\Day\Time-Minute" format) can be added to the name of the directory in order to easily identify the backup.
    Remark: The backups are performed in a numbered subdirectory ("backup\Backups\1" for example). Therefore, if several backups are performed, the corresponding files will not be overwritten by a new backup.
  10. Go to the next step of the wizard.
  11. Specify whether stored procedures must be started before or after the backup. If you choose to start a stored procedure, specify:
    • the name of the database containing the stored procedure to run,
    • the name of the set of procedures containing the stored procedure to run,
    • the name of the procedure to run.
    Specify the actions associated with the backup:
    • Stored procedure before or after backup: In this case, the next step of the wizard is to specify:
      • the name of the database containing the stored procedure to run,
      • the name of the set of procedures containing the stored procedure to run,
      • the name of the procedure to run.
    • Versions 25 and later
      Webhook run after backup: In this case, the next step of the wizard is to specify the URL of the webhook (REST service) to which the backup result should be sent.
      New in version 25
      Webhook run after backup: In this case, the next step of the wizard is to specify the URL of the webhook (REST service) to which the backup result should be sent.
      Webhook run after backup: In this case, the next step of the wizard is to specify the URL of the webhook (REST service) to which the backup result should be sent.
  12. Give a description to your backup and validate.
  13. The backup is automatically started. The progress of the backup can be monitored in the HFSQL Control Center.
Remark: You also have the ability to perform a backup from the "Backups" tab of a database selected in the treeview on the left of the screen.

Performing a scheduled backup

To perform a scheduled backup:
  1. Connect (if necessary) to a HFSQL server.
  2. Double-click the name of HFSQL server in the tree structure.
  3. The right section of Control Center displays a tab with the server name.
  4. Click the "Backups" tab.
  5. In the ribbon, in the "Backups" group, expand "New backup" and select "New scheduled backup". The wizard for creating a backup starts.
  6. Specify the content of the backup: the entire server content, a specific database, a selection of databases and/or files.
  7. Go to the next step of the wizard and specify the backup options:
    • whether the result of the backup must be compressed in zip format.
    • whether the backup must contain the index files (NDX index files and FTX full-text index files). If the index files are not saved, the size of the backup will be reduced but the restore time will be longer. Remark: if the index files are not saved, the passwords of the files must be specified during the restore operation to allow their reindexing.
  8. Go to the next step of the wizard.
  9. Choose a scheduling scenario among the preset scenarios. You can also choose a custom scheduling. In this case, the next steps of the wizard will guide you through the definition of the schedule.
  10. Go to the next step of the wizard.
  11. Specify the backup location by specifying the backup directory. If this name corresponds to a relative path, the backup will be performed in the "Backup" subdirectory of the HFSQL server. The wizard is used to define a "backup" subdirectory ("Backups" by default). The date and the time (in "Year\Month\Day\Time-Minute" format) can be added to the name of the directory in order to easily identify the backup.
    Remark: The backups are performed in a numbered subdirectory ("backup\Backups\1" for example). Therefore, if several backups are performed, the corresponding files will not be overwritten by a new backup.
  12. Go to the next step of the wizard.
  13. Specify whether stored procedures must be started before or after the backup. If you choose to start a stored procedure, specify:
    • the name of the database containing the stored procedure to run,
    • the name of the set of procedures containing the stored procedure to run,
    • the name of the procedure to run.
    Specify the actions associated with the backup:
    • Stored procedure before or after backup: In this case, the next step of the wizard is to specify:
      • the name of the database containing the stored procedure to run,
      • the name of the set of procedures containing the stored procedure to run,
      • the name of the procedure to run.
    • Versions 25 and later
      Webhook run after backup: In this case, the next step of the wizard is to specify the URL of the webhook (REST service) to which the backup result should be sent.
      New in version 25
      Webhook run after backup: In this case, the next step of the wizard is to specify the URL of the webhook (REST service) to which the backup result should be sent.
      Webhook run after backup: In this case, the next step of the wizard is to specify the URL of the webhook (REST service) to which the backup result should be sent.
  14. Specify whether you want to limit the number of backups stored on the server.
  15. Give a description to your backup and validate.
  16. The backup will be automatically started according to the specified scheduling. The progress of the backup can be monitored in the HFSQL Control Center.

Operations on the backups

The HFSQL Control Center allows you to handle the existing backups. You can:
  • Perform a backup.
  • Restore a backup.
  • Restore a backup found in a specific directory.
  • Delete a backup. To delete a backup, you must be a "Super user".
  • Restart a backup. Restart a backup (option available in "Other actions").
  • Versions 22 and later
    Retrieve a backup on the client computer (option available in "Other actions").
    New in version 22
    Retrieve a backup on the client computer (option available in "Other actions").
    Retrieve a backup on the client computer (option available in "Other actions").
To perform these operations:
  1. Connect (if necessary) to a HFSQL server.
  2. Double-click the name of HFSQL server in the tree structure.
  3. The right section of Control Center displays a tab with the server name.
  4. Select the "Backups" tab.
  5. Select the backup to handle.
  6. The options specific to the backup management are found in the "Backups" group of the ribbon. The are used to:
    • create a new backup (hot or scheduled backup),
    • restart a backup,
    • restore a backup,
    • delete a backup,
    • Versions 22 and later
      retrieve a backup. This option is available for the backups performed in the format of a ZIP file only. All you have to do is specify the location where the backup file will be saved.
      New in version 22
      retrieve a backup. This option is available for the backups performed in the format of a ZIP file only. All you have to do is specify the location where the backup file will be saved.
      retrieve a backup. This option is available for the backups performed in the format of a ZIP file only. All you have to do is specify the location where the backup file will be saved.
Remarks

Characteristics of the backup

The backup performed will correspond to the status of the database at the beginning of backup.
During the backup, you are not allowed to:
  • delete the data files and the databases,
  • update the stored procedures.

Management of a procedure before and/or after

It is possible to call a stored procedure before or after the backup. These procedures can take parameters.
Management of a procedure before: The stored procedure called BEFORE the backup can take parameters. This procedure has the following format:
PROCEDURE <Procedure name>(<Data to back up>, ...
<Backup destination>, <Description>)
These parameters are optional. They will allow you to handle the following indications in the code of the stored procedure:
  • <Data to back up>: Character string corresponding to the information to back up. Corresponds to ..Source. The possible values are as follows:
    *Makes a backup copy of all the databases of the server, the logs, the system databases (users, groups, rights).
    Database name/*Makes a back up copy of the entire database: files, links, stored procedures, triggers.
    Database name/Name of File1Makes a back up copy of <Name of File1> found in <Database name>
    Name of database 1/Name of File1 + TAB + Name of database 2/ Name of File2 + ...List of elements to back up. The separator can be the tabulation (TAB) or the semicolon (";").
    SystemMakes a backup copy of the system databases (users, groups, rights).
  • <Backup destination>: Name and destination of the backup. Corresponds to ..Destination. The backup will be preformed on the server, in a location defined by this name. If this name corresponds to a relative path, the backup will be placed in the "Backup" sub-directory of the HFSQL server. To specify:
    • the directory of the Manta service, use the "%%EXE%%" character string.
    • the year, use the "%%YEAR%%" character string (2008 for example).
    • the month on 2 digits, use the "%%MONTH%%" character string (03 for example).
    • the day, use the "%%DAY%%" character string.
    • the hour, use the "%%HOUR%%" character string.
    • the minutes, use the "%%MINUTE%%" character string.
  • <Description>: Backup description. Corresponds to ..Description.
Management of a procedure after: The stored procedure called AFTER the backup can take parameters. This procedure has the following format:
PROCEDURE <Procedure name>(<Data to back up>, <Backup destination>, ...
<Description>, <Status>, <Error message>)
These parameters are optional. They will allow you to handle the following indications in the code of the stored procedure:
  • <Data to back up>: Character string corresponding to the information to back up. Corresponds to ..Source. The possible values are as follows:
    *Makes a backup copy of all the databases of the server, the logs, the system databases (users, groups, rights).
    Database name/*Makes a back up copy of the entire database: files, links, stored procedures, triggers.
    Database name/Name of File1Makes a back up copy of <Name of File1> found in <Database name>
    Name of database 1/Name of File1 + TAB + Name of database 2/ Name of File2 + ...List of elements to back up. The separator can be the tabulation (TAB) or the semicolon (";").
    SystemMakes a backup copy of the system databases (users, groups, rights).
  • <Backup destination>: Name and destination of the backup. Corresponds to ..Destination. The backup will be preformed on the server, in a location defined by this name. If this name corresponds to a relative path, the backup will be placed in the "Backup" sub-directory of the HFSQL server. To specify:
    • the directory of the Manta service, use the "%%EXE%%" character string.
    • the year, use the "%%YEAR%%" character string (2008 for example).
    • the month on 2 digits, use the "%%MONTH%%" character string (03 for example).
    • the day, use the "%%DAY%%" character string.
    • the hour, use the "%%HOUR%%" character string.
    • the minutes, use the "%%MINUTE%%" character string.
  • <Description>: Backup description. Corresponds to ..Description.
  • <Status>: integer (or Integer constant) used to find out the status of the backup:
    hBackupInProgress0Backup in progress
    hBackupCompleted1Backup completed
    hBackupCanceled2Backup canceled
    hBackupError3Error during backup
  • <Error message>: Error message (if it exists) in character string format.
Versions 25 and later

Managing a webhook

A webhook allows you to trigger a process automatically via a REST service. Simply enter the URL of the REST service.
A POST request will be performed on the provided URL. The URL receives an "application/json" content corresponding to the information on the backup. For example:
{
"identifier": "283",
"destination": "c:\backup\283\mybackup.zip",
"state": "completed"
}
where:
  • "identifier" corresponds to the backup identifier.
  • "destination" corresponds to the backup destination.
  • "state" corresponds to the state of the backup. There are two states: 'completed' or 'error'.
New in version 25

Managing a webhook

A webhook allows you to trigger a process automatically via a REST service. Simply enter the URL of the REST service.
A POST request will be performed on the provided URL. The URL receives an "application/json" content corresponding to the information on the backup. For example:
{
"identifier": "283",
"destination": "c:\backup\283\mybackup.zip",
"state": "completed"
}
where:
  • "identifier" corresponds to the backup identifier.
  • "destination" corresponds to the backup destination.
  • "state" corresponds to the state of the backup. There are two states: 'completed' or 'error'.

Managing a webhook

A webhook allows you to trigger a process automatically via a REST service. Simply enter the URL of the REST service.
A POST request will be performed on the provided URL. The URL receives an "application/json" content corresponding to the information on the backup. For example:
{
"identifier": "283",
"destination": "c:\backup\283\mybackup.zip",
"state": "completed"
}
where:
  • "identifier" corresponds to the backup identifier.
  • "destination" corresponds to the backup destination.
  • "state" corresponds to the state of the backup. There are two states: 'completed' or 'error'.
Minimum version required
  • Version 9
This page is also available for…
Comments
IN THE CLASS OF TODAY WE WILL SEE HOW TO MAINTAIN THE BANK

NA AULA DE HOJE VAMOS VER COMO DAR MANUTENCAO NO BANCO
VIA HFSQL CONTROL Center

IN THE CLASS OF TODAY WE WILL SEE HOW TO MAINTAIN THE BANK
VIA HFSQL CONTROL Center

EN LA AULA DE HOY VAMOS VER COMO DAR MANTENIMIENTO EN EL BANCO
VIA HFSQL CONTROL Center

// BLOG COM VIDEO E EXEMPLO

http://windevdesenvolvimento.blogspot.com.br/2017/07/aula-1215-windev-hyperfile-31.html

https://www.youtube.com/watch?v=U2Xf7Xk5iZw

De matos
20 Jul. 2017