ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
  • Characteristics of backup:
  • Rights required to add a scheduled backup
  • Operations on a scheduled backup
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds a scheduling for full backup (with or without differential backup) on the server defined by the connection. This backup scheduling was defined by an hBackupDescription variable.
Example
ConnexionBase is Connection

// Création d'une sauvegarde planifiée toutes les 5 minutes 
// avec une sauvegarde différentielle toutes les minutes
hSvg is hBackupDescription
hSvg.Enabled = True
hSvg.WithIndex = True
hSvg.Description = "Sauvegarde planifiée toutes les N minutes avec " + ...
	"une sauvegarde différentielle toutes les minutes sur la base " + ...
	ConnexionBase.Database + " créée le "+ ...
	DateToString(DateSys(), maskDateSystem) + " à " + ...
	TimeToString(TimeSys(), "HH:MM:SS:CC")
hSvg.Destination = "Sauvegarde_" + ConnexionBase.Database
hSvg.LimitNumberBackups = 2
hSvg.Source = ConnexionBase.Database
hSvg.SchedulingFull.Month = "*"
hSvg.SchedulingFull.DayOfMonth = "*"
// Définition de la planification
dhDateHeureServeur is DateTime = HInfoServer(ConnexionBase, hInfoDate)
dhDateHeureServeur.Minute++
hSvg.SchedulingFull.Hour = dhDateHeureServeur.Hour
hSvg.SchedulingFull.Minute = dhDateHeureServeur.Minute
hSvg.SchedulingFull.DayOfWeek = "*"
hSvg.SchedulingFull.DayOfMonthOrDayOfWeek = False
hSvg.SchedulingDifferential.Month = "*"
hSvg.SchedulingDifferential.DayOfMonth = "*"
hSvg.SchedulingDifferential.Hour = "*"
hSvg.SchedulingDifferential.Minute = "*"
hSvg.SchedulingDifferential.DayOfWeek = "*"
hSvg.SchedulingDifferential.DayOfMonthOrDayOfWeek = False

// Ajout de la sauvegarde planifiée
IF HAddScheduledBackup(ConnexionBase, hSvg) = False THEN
	Error("Echec de la création de la sauvegarde planifiée", ...
		HErrorInfo(hErrFullDetails))
	RETURN
END
Syntax
<Result> = HAddScheduledBackup(<Connection> , <Scheduled backup>)
<Result>: Boolean
  • True if the scheduled backup was added,
  • False otherwise.
<Connection>: Character string or Connection variable
Connection for which a scheduled backup will be added. This connection corresponds to:
<Scheduled backup>: hBackupDescription variable
Name of the hBackupDescription variable used.
Remarks

Characteristics of backup:

  • Backup the contents of an HFSQL server: all server databases, several or a single database, one or more data files. This backup can be performed even if one or more databases are currently used.
  • The backup performed will correspond to the state of the database at the start of the backup: the backed-up database is consistent.. Certain operations are prohibited during backup: deleting files and databases, updating stored procedures.
  • The backup description is performed via the hBackupDescription variable. You can define:
    • a stored procedure to run BEFORE the backup. This procedure can cancel the backup if necessary.
    • a stored procedure to run AFTER the backup.

Rights required to add a scheduled backup

To add a scheduled backup, the user or user group must have:
  • the rights to perform backups (hRightsBackup constant). These rights apply to the servers and to the databases. For example, to perform a full server backup, you must have the rights to perform backups at server level.
  • the rights to manage the tasks (hRightsManageTask constant).
To find out whether a user or a group of users has sufficient rights, use HInfoServerRights or HInfoDatabaseRights.
To modify the rights granted to a user or group of users, use HModifyServerRights or HModifyDatabaseRights.

Operations on a scheduled backup

Several functions are used to handle a scheduled backup:
You can also:
Component: wd300hf.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help