Table of Contents

Backing Up HgLab

Upcoming versions of HgLab will feature significantly improved management tools, which will greatly simplify the process of backing up and restoring your HgLab instance. For now, you can use tried and true approaches.

When backing up your HgLab installation, there are three items to include into the backup:

  • Database
  • Home Directory
  • License
What can be better than to have backups? Having consistent backups is certainly better, which means that it's strongly recommended to shut down HgLab when performing backups.

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.

Backing Up Database

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.

Backing Up Home Directory

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

Backing Up License

HgLab License is essentially a text document, so just place it someplace safe. Worse comes to worst and the License gets lost, mail to to get help.

comments powered by Disqus

Take HgLab for a Spin

Try HgLab now. Full-featured 45-day evaluation, no credit card required.