I have a best practice of backing up several key things for any Citrix implementation.
Most of our Citrix servers do get backed up on a regular basis, but outside of the daily backups I like to keep a small thumb drive with some critical configuration information that would go a long way toward building the farm back from scratch if necessary. Having these components has come in handy many times.
The Citrix servers themselves are like soldiers in an army, and as far as configuration they are expendable. They build their Local Host Cache dynamically, based on the central Data Store of the farm, a static SQL or Access database. This database is the first thing I back up to a thumb drive, once in a while, whenever we make a lot of changes to the farm – publish new apps, change farm or server configuration settings. The datastore for a small to medium farm is usually under 10MB.
To back up the datastore on SQL, just use SQL tools. If the datastore is on Access, it is on one of the Citrix servers. You need to go to the Citrix console that has the datastore and use the Citrix “dsmaint” command:
dsmaint backup f:
where “f:” is the path you want to save the datastore to. There is no command in Citrix to tell you where the datastore is; you had to be there when it got set up, or you had to have documentation. If you don’t know where your datastore is, there is a registry key on every Citrix server: HKLMSoftwareCitrixIMA; There you will see “PSSERVER” and the value of the datastore.
If the datastore is on SQL, there is a DSN file on atleast one of the Citrix servers (best practice is to put one on each Citrix server); the DSN file will point to the SQL (or Oracle or DB2) database hosting the Citrix farm datastore.
The second thing I always store on the thumb drive for Citrix critical backup is the license file. It’s only 4K, and even though Citrix promises the “mycitrix” site will always be up, there are days it’s hard to get to it, or you can’t find your “mycitrix” credentials. Having the license file – digitally signed and tied to the hostname of the current license server – can come in handy. Technically the license server can be down for up to 30 days, and Event Viewer will alert you all 727 hours of the thirty days. This is just in case you didn’t catch that and you got to the 31st day, and your Citrix server stopped accepting connections.
To copy the license file, (*.lic), you need to go the license server, which you can find by looking at your farm properties, and then go to Program files, Citrix, Licensing, myfiles. There you will find the license file(s), which you can just copy to the thumb drive.
The third thing I like to keep on the critical Citrix thumb Drive is the “webinterface.conf” file. Everything else you configure in Citrix goes to the datastore, but the configuration for the Web Interface, including any NAT settings and security settings, are stored in the “webinterface.conf” file. This file can be exported by highlighting your Web Interface site in the Access Management console and choosing “export” from the tasks pane.
If you’re using Citrix Secure Gateway with the Web Interface, then you have one more thing to back up: the certificate on the web server. You can export this using IIS tools, usually as a “*.pfx” file.
With these four components, and a Citrix server CD and a Windows 2003 server CD, (and your applications and your data), the whole farm can be built back from scratch if necessary. (If you stream your apps to servers, this too can be put on the thumb drive!)
Our backups still run every night on our Citrix servers, and we get the local profiles and user settings, but if we need the critical components for troubleshooting, we have them all handy on a thumb drive, to use in case of emergency.