How to Backup NetScaler® Configuration and Restore It (CLI and GUI)
By Jay H.Published Updated 10 min read
Jay H. · Founder, Sessionright
Founder of Sessionright. Twenty years running Citrix, NetScaler, Citrix Cloud, NetScaler Console, Azure and Azure Virtual Desktop estates; writes the guides and reviews the platform's rules.
Need a restore you can trust before tonight's change? Walk through it with a Sessionright engineer: 15 minutes, free.
NetScaler's own upgrade checklist tells you to back up the configuration file, customisation files, certificates, monitor scripts and licence files before you touch the firmware (Before you begin, last published 30 September 2026). The built-in tool for that is create system backup. Three avoidable mistakes break a restore: the default backup level leaves out the certificates, the file never left the appliance, or someone renamed it.
This guide covers what basic and full backups contain, where the file lands, how to copy it off, how to restore on the same or a replacement appliance, and what changes in an HA pair. Every command comes from docs.netscaler.com or the NetScaler CLI and NITRO references.
Basic vs full backup (as documented)
The backup and restore page describes two levels. A basic backup covers files that "constantly change". A full backup "includes less frequently updated files in addition to those backed up by a basic backup."
| Level | What it adds | Source |
|---|---|---|
| Basic (default) | /nsconfig/: ns.conf, ZebOS.conf, rc.netscaler, snmpd.conf, nsbefore.sh, nsafter.sh, ntp.conf, syslog.conf, crontab, hosts, sshd_config, httpd.conf, rc.conf and others. /var/: download/*, netscaler/locdb/*, vpn/bookmark/*, netscaler/crl, nstemplates/*, learnt_data/*, custom.html, nslw.bin/etc/krb.keytab and others |
Basic backup file table (PDF) |
| Full | Everything above, plus /nsconfig/ssl*, license*, fips* and /var/netscaler/ssl/*, wi/java_home/jre/lib/security/cacerts/*, wi/java_home/lib/security/cacerts/* |
Backup and restore |
Three practical consequences:
- Certificates are not in a basic backup. If a restore has to bring back Gateway or load balancing certificates and keys, it has to be a full backup.
- Some files are in neither list. The Before you begin page names
/nsconfig/monitors/*.pl(custom monitor scripts) and/var/customizations(for example, a Gateway logon page with a logo) as files to back up yourself. It also says to delete the customizations folder from the appliance before an upgrade. Copy both by hand. - Missing files are skipped. If a file "is not available, the operation skips that file", so a completed backup is not proof that everything you need is inside it.
create system backup and where it lands
Back up from the CLI
-
Save the running configuration, so the backup contains what is actually running:
save ns config -
Create the backup. The full CLI synopsis is:
create system backup [<fileName>] [-useLocalTimezone] [-level ( basic | full )] [-includekernel ( NO | YES )] [-comment <string>]For example:
create system backup -level full -comment "CHG1234 pre-upgrade"fileNametakes up to 63 characters,-includekerneldefaults toNO, and-useLocalTimezoneuses a local timestamp. Do not change the configuration while the backup runs. -
Confirm the file exists:
show system backupFor each file, the command returns
level,includekernel,comment,size(in KB),creationTime,version(the build that created it),createdByandIPAddress. Putversionand the file name in your change record, because a restore needs the same build or a later one.
File name and location
If you do not give a name, the appliance uses backup_<level>_<nsip_address>_<date-timestamp>.tgz. The file is a compressed TAR in /var/ns_sys_backup/, which holds up to 50 backup files "to avoid issues due to non-availability of disk space" (backup and restore). Prune with:
rm system backup backup_basic_<nsip_address>_<date-timestamp>.tgz
Back up from the GUI
Go to System > Backup and Restore, click Backup/Import, select Create, set File Name, Level (basic or full) and Comment, then click Backup. The file lands in the same directory as one created from the CLI.
Copying it off-box
A backup that only exists on the appliance does not help when the appliance fails. NetScaler's HA node replacement procedure takes both a full and a basic backup on the primary, then copies them to a workstation with pscp before it changes anything:
pscp nsroot@10.125.245.78:/var/ns_sys_backup/backup_basic_10.125.245.78_2016_09_14_15_08.tgz c:\nsbackup\backup_basic_10.125.245.78_2016_09_14_15_08.tgz
From a Linux or macOS host, scp with the same source path does the same job. In the same session, copy what the backup lists leave out: /nsconfig/monitors/*.pl and /var/customizations (Before you begin).
Two handling rules:
- Keep the original file name. The docs warn: "You cannot successfully restore your appliance if you rename or modify your backup file." Store the change number in a folder name or a sidecar note, not in the
.tgzname. - Treat a full backup as key material. It contains
/nsconfig/ssl*, so store it with the same access controls as your certificate keys.
On NetScaler SDX, the Management Service has its own backup in /var/mps/backup/. By default it creates one every 24 hours, and a Transfer button pushes files to an external server (SDX backup and restore). It is a separate mechanism from create system backup inside each instance.
Restore on the same appliance vs a replacement
Same appliance, file still in /var/ns_sys_backup
From the CLI procedure:
-
List the available files:
show system backup -
Restore one of them:
restore system backup backup_full_<nsip_address>_<date-timestamp>.tgzThe restore untars the file from
/var/ns_sys_backup/and copies each file back to its directory. By default it first backs up the current configuration. Add-skipBackuponly if you have already saved a copy of the current state. -
Reboot:
reboot
In the GUI: System > Backup and Restore, select the file, click Restore, check the details on the Restore page, click Restore, then reboot.
Same or replacement appliance, file copied back from off-box
Copy the .tgz into /var/ns_sys_backup/ on the target node, then register it before you restore. The cluster restore procedure uses the same command sequence on the node being restored:
add system backup <fileName>
restore system backup <fileName>
reboot
The CLI reference describes add system backup as adding a backup file "created in remote system". The basic operations page says import is GUI-only (Backup/Import > Import), so if the CLI command is rejected on your build, use the GUI.
Replacement appliance checklist
The backup and restore page lists two conditions: the new platform must support the network configuration, and its build must be "the same as the backup file or a later version". The HA replacement procedure adds steps you have to do before the restore:
| Step | Command or action |
|---|---|
| Set the NSIP from the console | Console port, initial configuration prompt |
| Match the build | show version, then upgrade to the backup's build (CLI upgrade guide) |
| Licence the new unit | Request licences for the replacement, copy them to /nsconfig/license/, reboot -w, show license |
| Match the nsroot password (HA) | set system user nsroot <password> |
Although a full backup carries the old unit's /nsconfig/license* files, the documented procedure requests new licences for the replacement.
If you use NetScaler Console, its backup and restore page states: "You cannot use the backup file taken from one instance to restore a different instance." Use create system backup files for a replacement.
HA-pair considerations
A backup is per node, and its file name carries that node's NSIP. In an HA pair, take one on each node and keep four points in mind:
- Some settings never sync. HA node commands, interface settings and channel settings are neither synced nor propagated. In INC mode, SNIPs, VLANs, routes (except LLB routes), route monitors and dynamic routing also stay per node (HA FAQs). The primary's backup does not contain the secondary's copy of these.
- The secondary overwrites itself from the primary. Synchronization runs when the secondary restarts or when the primary becomes secondary after a failover. During it, the secondary runs
clear ns configand loads the primary's configuration (HA synchronization). A backup restored onto the secondary alone is overwritten from the primary when the secondary comes back up, so restore onto the primary. - Files follow the primary. Configuration files sync from primary to secondary every minute. After a restore, push them explicitly with
sync HA files all, orall_plus_miscto include licences andrc.conf(sync HA files). The command fails on a standalone node or if the secondary is disabled. - Restore the node the file came from. NetScaler Console tells you to restore the instance the backup was taken from, "even if it is no longer the primary instance". While it restores the primary, the secondary is set to STAYSECONDARY, and it returns to ENABLED once the restore completes. Expect downtime on the node being restored.
When you replace a failed node, the documented order is: back up the primary and copy the files off, set the secondary to set ha node -haStatus STAYSECONDARY, run rm ha node <node ID> and save ns config on the primary, then build and pair the replacement. The HA pair upgrade runbook shows where the backups fit in an upgrade.
For clusters, run create system backup on the cluster IP. It writes a file on each node, and each node is restored individually (cluster backup). Backup and restore do not work if CLAG is configured on an SDX cluster. NetScaler Console cannot back up clusters.
Automating backups before every change
Make the backup the first step of every change script. The NITRO systembackup resource exposes the same operations as the CLI:
POST /nitro/v1/config/systembackup?action=create
Cookie: NITRO_AUTH_TOKEN=<token>
Content-Type: application/json
{"systembackup": {"level": "full", "comment": "CHG1234 pre-change"}}
Success returns 200 OK. GET /nitro/v1/config/systembackup lists the files with the same properties as show system backup, action=restore takes filename and skipbackup, and DELETE /nitro/v1/config/systembackup/<filename> removes one. Send these to the NSIP over HTTPS.
A pre-change job that holds up under audit does five things in order:
save ns config(NITRO or SSH).- Create a full backup with the change ID in the comment.
- Read it back with
GETand check thatlevel,versionandcreationTimematch what you expect. Fail the job if they do not. - Copy the
.tgz,/nsconfig/monitors/*.pland/var/customizationsoff-box withscp, and record a checksum. - Delete the oldest files once you approach the 50-file limit.
Run it against both HA nodes. NetScaler Console can also take automatic backups of MPX, VPX, BLX and SDX instances over NITRO, SSH and SCP, but its backup directory holds a maximum of three files. Use Transfer to send copies out over SCP, SFTP or FTP (Console backup and restore).
Keep the restore path out of unattended scripts. action=restore followed by a reboot is an outage. It should run only after a person has read the show system backup output and approved the target file. After any restore, run the post-patch checklist checks: virtual servers, certificates, Gateway logon.
FAQ
Where is the NetScaler backup file stored?
In /var/ns_sys_backup/ on the appliance, as a compressed TAR (.tgz). The default name is backup_<level>_<nsip_address>_<date-timestamp>.tgz, and the directory holds up to 50 files.
What is the difference between a NetScaler full and basic backup?
A basic backup, the default, contains frequently changing files such as ns.conf, rc.conf, ZebOS.conf and Gateway bookmarks. A full backup adds the SSL, licence and FIPS directories under /nsconfig and /var/netscaler/ssl/*. Use full before upgrades and certificate work.
How do I download a NetScaler backup to my PC?
Copy it over SCP or SFTP. NetScaler's own HA replacement procedure uses pscp nsroot@<NSIP>:/var/ns_sys_backup/<file>.tgz c:\nsbackup\<file>.tgz. Keep the file name unchanged, because a renamed file cannot be restored.
Can I restore a NetScaler backup to a different appliance?
Yes, with create system backup files, provided the new platform supports the network configuration and runs the same or a later build. Copy the file to /var/ns_sys_backup/, import it, restore and reboot. NetScaler Console backups cannot be restored to a different instance.
Does a NetScaler backup include SSL certificates?
Only a full backup. A basic backup does not include /nsconfig/ssl* or /var/netscaler/ssl/*.
Do I need to reboot after restoring a NetScaler backup?
Yes. Both the CLI and GUI procedures end with a reboot: "After you restore, you must reboot the appliance."
Want a second pair of eyes?
A fresh backup is step one of every patch. Step two is knowing which build to move to: paste your show ns version output into the free NetScaler build and CVE checker, which maps it to bulletins and fixed builds in your browser. Sessionright's Nightpatch runs the HA-aware upgrade as plan, approve, execute. It is read-only by default, and every change is approved and logged. If you would rather talk it through, book a 15-minute call: no install, no sales deck.
Sources
- NetScaler docs: System basic operations: How to back up and restore your appliance
- NetScaler docs: Basic backup file table (PDF)
- NetScaler docs: Before you begin (upgrade and downgrade)
- NetScaler docs: Remove and replace a NetScaler in a high availability setup
- NetScaler docs: Configuring synchronization
- NetScaler docs: Synchronizing configuration files in a high availability setup
- NetScaler docs: High availability FAQs
- NetScaler docs: Backup and restore of cluster setup
- NetScaler docs: Back up and restore NetScaler instances (NetScaler Console service)
- NetScaler docs: Back up and restore the configuration data of the SDX appliance
- NetScaler CLI reference: system-backup
- NetScaler NITRO API reference: systembackup
Check your build before the next bulletin
Paste a NetScaler build or your show ns version output into the free checker to see the CVEs that affect it, their CISA KEV status and the fixed build for your release. It runs in your browser and never touches the appliance.
Not ready for that? Talk to a Sessionright engineer: 15 minutes, free, and you leave with a next step.
Or get the next guide by email. One email per new guide, no marketing list.
Related guides
- How to Upgrade NetScaler Console (ADM) On-Prem: HA, DR and Agents
How to upgrade NetScaler Console on-prem: paths to 14.1, pre-upgrade and LAS checks, HA and DR order, agent upgrades, and what to verify afterwards.
- NetScaler Firmware Upgrade via CLI: Commands That Actually Work
The exact NetScaler CLI upgrade sequence: /var space checks, backup, staging in /var/nsinstall, installns pre-checks, reboot, verification and common errors.
- NetScaler 13.1 End of Life: Dates, Security Builds and 14.1
NetScaler 13.1 passed end of maintenance on 15 September 2026 and reaches end of life on 15 September 2027. Post-EOM builds, the 14.1 target and HA steps.
- NetScaler Release Notes and Latest Build: How to Find Them
Where the NetScaler 14.1 and 13.1 release notes live, how to read a build number and bulletin, and the latest build per line, checked 20 November 2026.
- CTX697305: NetScaler November 2026 Bulletin and Fixed Builds
CTX697305 fixes 28 NetScaler ADC and Gateway CVEs. The fixed build for each release line, which CVE needs which configuration, and how to check your appliance.
Citrix and NetScaler are trademarks of Citrix Systems, Inc. and/or its affiliates. Azure is a trademark of the Microsoft group of companies. Sessionright is not affiliated with or endorsed by Cloud Software Group, Citrix or Microsoft.