PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • Backups in the HFSQL Control Center
  • Overview
  • Performing a backup
  • Performing a backup
  • Performing a scheduled backup
  • Performing a scheduled backup
  • Operations on the backups
  • Operations on the backups
  • Backups by programming
  • Creating an immediate backup by programming
  • Creating a scheduled backup by programming
  • WLanguage functions used to manage the backups (full, differential, scheduled and immediate 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
How to backup HFSQL Client/Server databases?
HFSQL Client/ServerAvailable only with this kind of connection
Overview
The backup of the HFSQL Client/Server databases can be performed:
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Backups in the HFSQL Control Center

Overview

The HFSQL Control Center is used to create and manage:
  • full or differential backups,
  • immediate or scheduled backups.

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 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. 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.

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.
  • 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.

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.
Backups by programming
Several WLanguage functions can be used to manage the backups by programming. You have the ability to perform:
  • full or differential backups,
  • immediate or scheduled backups.

Creating an immediate backup by programming

To create an immediate backup by programming:
  1. Define the characteristics of the backup via a hBackupDescription variable. If the backup is an immediate backup, only a full backup can be performed.
  2. Perform the backup with HBackup.

Creating a scheduled backup by programming

To create a scheduled backup by programming:
  1. Define the characteristics of the backup via a hBackupDescription variable as well as its scheduling options. You have the ability to define a differential backup associated with a full backup.
  2. Add the scheduled backup via HAddScheduledBackup.

WLanguage functions used to manage the backups (full, differential, scheduled and immediate backups)

The following WLanguage functions can also be used to manage the backups:
Versions 15 and later
HAddScheduledBackup
New in version 15
HAddScheduledBackup
HAddScheduledBackup
Adds a scheduling for full backup (with or without differential backup) on the server defined by the connection.
Versions 12 and later
HBackup
New in version 12
HBackup
HBackup
Makes a backup copy of the content of an HFSQL server: all databases on the server, one or more databases, one or more data files.
Versions 12 and later
HCancelBackup
New in version 12
HCancelBackup
HCancelBackup
Cancels a current backup.
Versions 14 and later
HDeleteBackup
New in version 14
HDeleteBackup
HDeleteBackup
Deletes a backup previously performed by HBackup.
Versions 15 and later
HDeleteScheduledBackup
New in version 15
HDeleteScheduledBackup
HDeleteScheduledBackup
Deletes a scheduling for backup from a HFSQL Client/Server server.
Versions 15 and later
HExecuteScheduledBackup
New in version 15
HExecuteScheduledBackup
HExecuteScheduledBackup
Forces the execution of a scheduled backup.
Versions 12 and later
HInfoBackup
New in version 12
HInfoBackup
HInfoBackup
Returns information about one or more backups performed on an HFSQL Client/Server server.
Versions 15 and later
HListScheduledBackup
New in version 15
HListScheduledBackup
HListScheduledBackup
Lists the full and differential backups that have been scheduled on a HFSQL Client/Server server.
Versions 15 and later
HModifyScheduledBackup
New in version 15
HModifyScheduledBackup
HModifyScheduledBackup
Modifies a backup scheduling.
Versions 12 and later
HRestoreBackup
New in version 12
HRestoreBackup
HRestoreBackup
Used to restore:
  • an immediate backup (performed by HBackup or via the HFSQL Control Center),
  • a scheduled backup (described by HAddScheduledBackup or via the HFSQL Control Center.
Versions 22 and later
HRetrieveBackup
New in version 22
HRetrieveBackup
HRetrieveBackup
Retrieves locally the content of a compressed backup (in ZIP format) performed on a HFSQL server.
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 15
This page is also available for…
Comments
Click [Add] to post a comment