Home | Sign in | English EN

  • Characteristics of backup:
  • Rights required to add a scheduled backup
  • Operations on a scheduled backup
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
// Describe the connection
DatabaseConnection is Connection
// Create a scheduled backup every 5 minutes
// with a differential backup every minute
hBck is hBackupDescription
hBck..Enabled = True
hBck..WithIndex = True
hBck..Description = "Scheduled backup every N minutes with " + ...
"an incremental backup every minut on the " + ...
DBConnection..Database + " created on "+ ...
DateToString(DateSys(), maskDateSystem) + " at "+  ...
TimeToString(TimeSys(), "HH:MM:SS:CC")
hBck..Destination = "Backup_" + DBConnection..Database
hBck..LimitNumberBackups = 2
hBck..Source = DatabaseConnection..Database
hBck..SchedulingFull..Month = "*"
hBck..SchedulingFull..DayOfMonth = "*"
// Define the scheduling
dhServerDateTime is DateTime = DBConnection.InfoServer(hInfoDate)
hBck..SchedulingFull..Hour = dtServerDateTime..Hour
hBck..SchedulingFull..Minute = dtServerDateTime..Minute
hBck..SchedulingFull..DayOfWeek = "*"
hBck..SchedulingFull..DayOfMonthOrDayOfWeek = False
hBck..SchedulingDifferential..Month = "*"
hBck..SchedulingDifferential..DayOfMonth = "*"
hBck..SchedulingDifferential..Hour = "*"
hBck..SchedulingDifferential..Minute = "*"
hBck..SchedulingDifferential..DayOfWeek = "*"
hBck..SchedulingDifferential..DayOfMonthOrDayOfWeek = False
// Add the scheduled backup
IF DBConnection.AddScheduledBackup(hBck) = False THEN
Error("Failure creating the scheduled backup", ...
<Result> = <Connection>.AddScheduledBackup(<Scheduled backup>)
<Result>: Boolean
  • True if the scheduled backup was added,
  • False otherwise.
<Connection>: Connection variable
Name of the Connection variable that describes the connection for which a scheduled backup must be added.
<Scheduled backup>: hBackupDescription variable
Name of the hBackupDescription variable used.

Characteristics of backup:

  • Saving the content of a HFSQL server: all databases on the server, one or more databases, one or more data files. This backup can be performed even if one or more databases are currently used.
  • The database will be backed up at its state at the beginning of the backup: the backed up database is consistent. Some operations are not allowed during the backup: deleting files or databases, updating stored procedures.
  • The backup description is performed via the hBackupDescription variable. You have the ability to 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.
  • Versions 23 and later
    the rights to manage the tasks (hRightsManageTask constant).
    New in version 23
    the rights to manage the tasks (hRightsManageTask constant).
    the rights to manage the tasks (hRightsManageTask constant).
To find out whether a user or a group of users has sufficient rights, use <Connection variable>.InfoServerRights or <Connection variable>.InfoDatabaseRights.
To modify the rights granted to a user or to a group of users, use <Connection variable>.ModifyServerRights or <Connection variable>.ModifyDatabaseRights.

Operations on a scheduled backup

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