Product Documentation

Backing up and Restoring the NetScaler Appliance

Sep 15, 2015

You can back up the current state of a NetScaler appliance, and later use the backed up files to restore the appliance to the same state. You must use this feature before performing an upgrade or for precautionary reasons. A backup of a stable system enables you to restore the system to a stable point in the event that it becomes unstable.

Points to remember

  • You cannot use the backup file taken from one appliance to restore a different appliance.
  • You can back up and restore appliances in an HA setup, but make sure that you restore to the same appliance from which the backup file was created. For example, if the backup was taken from the primary appliance of the HA pair, when restoring make sure that the appliance you are restoring is the same appliance, even if it is no longer the primary appliance.
  • You cannot perform the backup and restore operation on a NetScaler cluster.
This document includes the following details:

Backing up a NetScaler Appliance

Depending on the type of data to be backed up and the frequency at which you will create a backup, you can take a basic backup or a full backup.

  • Basic backup. Backs up only configuration files. You might want to perform this type of backup frequently, because the files it backs up change constantly. The files that are backed up are:

    Directory Sub-Directory or Files

    /nsconfig/

    • ns.conf
    • ZebOS.conf
    • rc.netscaler
    • snmpd.conf
    • nsbefore.sh
    • nsafter.sh
    • inetd.conf
    • ntp.conf
    • syslog.conf
    • newsyslog.conf
    • crontab
    • host.conf
    • hosts
    • ttys
    • sshd_config
    • httpd.conf
    • monitrc
    • rc.conf
    • ssh_config
    • localtime
    • issue
    • issue.net

    /var/

    • download/*
    • log/wicmd.log
    • wi/tomcat/webapps/*
    • wi/tomcat/logs/*
    • wi/tomcat/conf/catalina/localhost/*
    • nslw.bin/etc/krb.conf
    • nslw.bin/etc/krb.keytab
    • netscaler/locdb/*
    • lib/likewise/db/*
    • vpn/bookmark/*
    • netscaler/crl
    • nstemplates/*
    • learnt_data/*

    /netscaler/

    • custom.html
    • vsr.htm
  • Full backup. In addition to the files that are backed up by a basic backup, a full backup backs up some less frequently updated files. The files that are backed up when using the full backup option are:

    Directory Sub-Directory or Files

    /nsconfig/

    • ssl/*
    • license/*
    • fips/*

    /var/

    • netscaler/ssl/*
    • wi/java_home/jre/lib/security/cacerts/*
    • wi/java_home/lib/security/cacerts/*

The backup is stored as a compressed TAR file in the /var/ns_sys_backup/ directory. To avoid issues due to non-availability of disk space, you can store a maximum of 50 backup files in this directory. You can use the rm system backup command to delete existing backup files so that you can create more backups.

Note:
  • While the backup operation is in progress, do not execute commands that affect the configuration.

  • If a file that is required to be backed up is not available, the operation skips that file.

To backup the NetScaler by using the NetScaler command line interface

At the command prompt, do the following:

  1. Save the NetScaler configurations.

    save ns config

  2. Create the backup file.

    create system backup [<fileName>] -level <basic ¦ full> -comment <string>

    Note: If the file name is not specified, the appliance creates a TAR file with the following naming convention: backup_<level>_<nsip_address>_<date-timestamp>.tgz.
    Example: To backup the full appliance using the default naming convention for the backup file.
    > create system backup -level full
    
  3. Verify that the backup file was created.

    show system backup

    You can view properties of a specific backup file by using the fileName parameter.

To backup the NetScaler by using the configuration utility

Navigate to System > Backup and Restore, click Backup and then specify the details of the backup.

Restoring the NetScaler Appliance

When you restore the appliance from a backup file, the restore operation untars the backup file into the /var/ns_sys_backup/ directory. Once the untar operation is complete, the files are copied to their respective directories.

Attention: The restore operation does not succeed if the backup file is renamed or if the contents of the file are modified.

To restore the NetScaler from a local backup file by using the command line interface

Note: Citrix recommends backing up the current configuration before restoring a previous configuration. However, if you do not want the restore command to automatically create a backup of the current configuration, use the –skipBackup parameter.

At the command prompt, do the following:

  1. Obtain a list of the backup files available on the appliance.

    show system backup

  2. Restore the appliance by specifying one of the backup files.

    restore system backup <filename> [-skipBackup]

    Example: To restore by using a full backup of an appliance.
    > restore system backup backup_full_<nsip_address>_<date-timestamp>.tgz
    
  3. Reboot the appliance.

    reboot

To restore the NetScaler from a local backup file by using the configuration utility

Navigate to System > Backup and Restore, right-click the backup file to be restored and click Restore.

To restore the NetScaler from a remote backup file by using the command line interface

Note: A remote backup file is any backup file that has been deleted from the NetScaler appliance.
Citrix recommends backing up the current configuration before restoring a previous configuration. However, if you do not want the restore command to automatically create a backup of the current configuration, use the –skipBackup parameter.

1.    Copy the backup tar file from remote server to the local NetScaler appliance's /var/ns_sys_backup directory.
2.    Add the backup metadata to the appliance's memory:
add system backup <backupFileName>
3.    Restore the backed up configuration:
restore system backup <fileName> [–skipBackup]