Jump to content
Welcome to our new Citrix community!

persistence crontab after sdx reboot

Recommended Posts

Hello together,

i hope you guys could help me with a little problem:

We use a .sh script to transfer the automated generated backups from the SDX to an external logserver.
The execution is triggered in /etc/crontab:

#minute    hour    mday    month    wday    who    command
0    *    *    *    *    root    newsyslog
0    0    *    *    *    root    purge_tickets.sh
# time zone change adjustment for wall cmos clock,
# does nothing, if you have UTC cmos clock.
# See adjkerntz(8) for details.
1,31    0-5    *    *    *    root    adjkerntz -a
0    4    *    *    *    root    /var/sic/sdx_backup.sh

Works fine so far. But after a reboot of the sdx, the crontab is empty again. 

Is there a way to get a persistence after the reboot?

Thanks in advance.

Link to comment
Share on other sites

So, I'm not sure if this will work the same way on SDX; so you still might need an engineer to answer.

The problem on the NetScaler (and therefore also the SDX), is that /etc/ is part of RAM and resets at boot.

So, if we are on a NetScaler ADC instance and trying to setup crontab, you'd have to put it in an override file in /nsconfig/.  See Johannes' notes and related links here:  https://blog.norz.at/scheduling-commands-on-citrix-netscaler-from-crontab/.


For SDX, in theory, you would put it in the equivalent SDX directory: /flash/<dirname>  BUT I don't know if it would be the same rc.netscaler file or some other file name.

OR if its possible.  This is why ADM would make this easier. or a Syslog audit setting on the SDX would make it easier to export with having to deal with these settings.  Hopefully, someone else can help you with the details for if this type of override is possible on the SDX.

Link to comment
Share on other sites

Hi Rhonda,


thanks for reply, nice input.


Unfortunatelly there is no "easy" way to do this automatically. I solved this for me with a little script, who is located in an extra folder "sic" under /var, this is persistence after reboot. 
The script establishes the ssl connection to the logserver and added the crontab entry who executes the backup-script.sh also located in the Folder /var/sic
So after a reboot it is only necessary to execute this script one-time manually and the backup will work again. 
Not very smart but worked for me.


And we dont start the Hardware appliances so often that it makes sense to go deeper with that....


Thanks again.

Link to comment
Share on other sites

I didn't know how much of the NetScaler way would apply to the SDX.  But glad you found something.


The easy way is usually externally entity that does it for you, instead of NetSclaer or SDX doing it itself.  So, if it was available, ADM would make this an easy task to be scheduled. But other utilities that run a remote SSH connection, could also be used to schedule this...but I understand that  that's not always possible.


I at first read this as log files and then saw that you meant backups:

ADM can also make the backups for you and store on itself OR store to an external system.



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...