Backup restore on a NetScaler

You can easily backup a NetScaler's configuration if you select Configuration, System, Backup and Restore, and then click on Backup. I recommend always to create a full backup as a basic backup does not include the license file(s) nor any SSL keys or certificates. From that Backup and Restore menu you can also download or delete a backup. Of course you can restore a backup. But for this the backup file has to reside on the NetScaler. In case of a disaster recovery, when you have to reinstall from scratch, I'm not aware of any option to upload a backup file easily. Here's a workaround:

  1. Extract the file backup/nsbackup.txt from the backup archive (*.tgz)
  2. Rename nsbackup.txt to nsbackupmap.txt
  3. Copy both the backup archive and nsbackupmap.txt to the /var/ns_sys_backup directory on your freshly installed NetScaler
  4. Reboot the NetScaler. A warm reboot, which just reboots the loadbalancer kernel, but not the underlying FreeBSD system, is sufficient
  5. Restore your backup from the command line via restore system backup <backup.tgz>, or via the Backup and Restore menu
  6. Reboot again and your done.

Format of nsbackupmap.txt

The textfile /var/ns_sys_backup/nsbackupmap.txt contains one line per backup. Each line is separated by semicolons into different fields:

backup.tgzname of backup file (.tgz)
type1=basic 2=extended 3=full
username of user who created the backup
ipclient ip address from which the backup was created (32 bit integer)
versionversion string like NS11.1-50.10
epochseconds from 1.1.1970 when backup was created (date+time also part of filename)
sizekbsize of tgz in kB
commentuser comment