BackupDB
Purpose
This command will close the currently active HomeSeer configuration database and will make a backup copy of it in the Backup directory under the Config directory of HomeSeer.
Parameters
None
Returns
Parameter: result
Type: string
Description: The result of the backup operation. If it is an empty string ("") then the operation was successful. If the result is not empty, then it will contain information regarding the error or problem encountered during the backup procedure.
Example
Sample Code
None
Additional Information
The default number of backup copies of the database varies with the HomeSeer edition, but the typical amount is 10 for the standard edition of HomeSeer. The backup copies are numbered from 1 to the highest number of backups that are retained. The system overwrites the oldest file when this command is issued. Because the rotation is based upon file date/time, the 10th numbered file (in the case of a 10 limit rotation) is not always the oldest backup. You must examine the file modification dates/times to determine which backup is the most recent or oldest.
You can control the number of copies that are retained by adding the following setting to your settings.ini file in the CONFIG directory:
Edit this file when HomeSeer is shut down.
[Database]
Backup_Copies=15
In the above example, 15 copies will be retained. The number of copies to be retained must be greater than 0 and less than or equal to 50 or the value will be reset to its default value.