Last updated on October 27, 2017
When backing up your HgLab installation, there are three items to include into the backup:
Remember to apply retention policies to your backups. The most commonly used is "GFS" (Grandfather–Father–Son), which is a retention method for maintaining hierarchical restore points.
Each week, one full daily backup (latest from that week) is promoted from a son to a father and is deemed the weekly backup. Each month, a father (latest from that month) is promoted to a grandfather and is deemed the monthly backup.
There's a number of tools, both built-in and third-pary, to help one with backing up SQL Server databases. Back Up and Restore of SQL Server Databases has a lot of very detailed information on this exact topic.
Here's a simple script that gets the job done:
backup database [hglab] to disk = 'z:\backups\hglab\hglab-full.bak' with noformat, noinit
This will produce a full database backup which you will need to copy to where your backups are stored.
With HgLab shut down, backing Home Directory becomes a simple task of just copying (or archiving) it over to the backup location.
xcopy "d:\hglab home" z:\backups\hglab\home /e /i
HgLab License is essentially a text document, so just place it someplace safe. Worse comes to worst and the License gets lost, mail to firstname.lastname@example.org to get help.