Citrix NetScaler Automated backup job is failing after recent upgrade.

Citrix NetScaler Automated backup job is failing after recent upgrade.

book

Article ID: CTX693288

calendar_today

Updated On:

Description

After upgrading to NetScaler firmware 13.1.56.x or later, attempts to download backup files using the Nitro API may fail. Customers using automation tools such as Ansible, Postman, or custom scripts may receive the following error when downloading files through the systemfile endpoint: 

Main NetScaler log is tracked on /var/log/ns.log:

httpd: [PID] - User nsroot - Method GET - Command { "systemfile": { "filename": "Backup-*.tgz", "filelocation": "/var/ns_sys_backup" } } - Status { "errorcode": 283, "message": "File too large [Use other method to download the file]", "severity": "ERROR" }

This issue typically occurs when downloading backup files larger than 32 MB using the API.

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Resolution

The recommended workaround is to modify the automation script to use SCP (Secure Copy over SSH) instead of the Nitro API for downloading backup files.

Example:

scp nsroot@<netscaler_ip>:/var/ns_sys_backup/<backup_file>.tgz /path/to/local/backup/

Ensure that SSH is enabled on the appliance and the account used has the necessary access permissions.

This approach allows continued automation of backup retrieval without being affected by the Nitro API size limitation.


Problem Cause

Starting with NetScaler firmware 13.1.56.x, a maximum file size limit of 32 MB was introduced for downloading files via the systemfile Nitro API endpoint.

  • The limit is enforced by design and is not tunable.

  • The error message "File too large [Use other method to download the file]" is expected when a file exceeds the threshold.

A request has been submitted to the Citrix documentation team to include this API limitation in the official documentation.

Additional Information

https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/system/systemfile#operations.