PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Characteristics of backup:
  • Rights required to add a scheduled backup
  • Operations on a scheduled backup
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
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 advanced hBackupDescription variable.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 22 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 22
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// 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(), maskSystemDate) + " at "+  ...
TimeToString(TimeSys(), "HH:MM:SS:CC")
hBck..Destination = "Backup_" + DBConnection..Database
hBck..LimitNumberBackups = 2
hBck..Source = Cnt..Database
hBck..SchedulingFull..Month = "*"
hBck..SchedulingFull..DayOfMonth = "*"
// Define the scheduling
dtServerDateTime is DateTime = HInfoServer(DBConnection,hInfoDate)
dtServerDateTime..Minute++
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 HAddScheduledBackup(DBConnection, hBck) = False THEN
Error("Failure creating the scheduled backup", ...
HErrorInfo(hErrFullDetails))
RETURN
END
Syntax
<Result> = HAddScheduledBackup(<Connection Name> , <Name of Scheduled Backup>)
<Result>: Boolean
  • True if the scheduled backup was added,
  • False otherwise.
<Connection Name>: Character string (with or without quotes)
Name of connection for which a scheduled backup will be added. This connection was defined in the data model editor, or by HDescribeConnection or HOpenConnection.
<Name of Scheduled Backup>: hBackupDescription variable
Name of hBackupDescription variable used.
Remarks

Characteristics of backup:

  • Saving the content of a HFSQL server: all databases found 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 backup performed will correspond to the database status at the beginning of backup: the database integrity is preserved. 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 the 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 these rights are granted to a user or to a group, use HInfoServerRights or HInfoDatabaseRights.
To modify the rights granted to a user or to a group of users, use HModifyServerRights or HModifyDatabaseRights.

Operations on a scheduled backup

Several functions are used to handle a scheduled backup:
You also have the ability to:
Components
WINDEVWEBDEV - Server code wd230hf.dll
Windows Mobile wp230hf.dll
Linux wd230hf.so
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment