<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content

Change the Automatic Backup Schedule in Okta Access Gateway

Access Gateway
Okta Classic Engine
Okta Identity Engine

Overview

Administrators can change the automatic backup and replication schedule in Okta Access Gateway (OAG) by modifying the crontab configuration through the shell. Modify the minute and hour values in the configuration to adjust the backup timing.

    Applies To

    • Okta Identity Engine (OIE)
    • Okta Classic Engine
    • Okta Access Gateway (OAG)
    • Backup and Restore

    Solution

    How is the automatic backup schedule changed in Okta Access Gateway?

    Open the crontab configuration in Vim through the shell and modify the minute and hour values to adjust the backup timing.

    Open the crontab configuration in Vim through the shell by executing the following command.

    sudo crontab -e

    Review the following truncated crontab output that displays the default backup-related configurations.

    # Okta Access-Gateway backup script: oag_backup.sh
    0 0 * * * /opt/oag/scripts/oag_backup.sh
    # Okta Access-Gateway admin backup script: replicateBackup.sh
    0 2 * * * /opt/oag/scripts/replicateBackup.sh

    The oag_backup script backs up the existing application configurations. This process executes on all nodes individually. For example, all nodes in the cluster have a separate backup archive in /opt/oag/backups. Because the admin service resides only on the admin node, Okta replicates the backup from the admin to the workers through replicateBackup.sh under /opt/oag/backups/admin_backup.

    Change the first two values in the configuration, which correspond to the minute and hour, to adjust the backup timing.

    # Okta Access-Gateway backup script: oag_backup.sh
    30 21 * * * /opt/oag/scripts/oag_backup.sh
    # Okta Access-Gateway admin backup script: replicateBackup.sh
    30 23 * * * /opt/oag/scripts/replicateBackup.sh

    The replicateBackup.sh script must start at least two hours after the oag_backup.sh script starts to ensure adequate time for the backup to complete. The previous example runs the backup script every day at 21:30 system time and the replication script at 23:30 system time.

    Check the system time by executing the following command.

    date

    How are the crontab fields verified?

    Execute the cat command to view the crontab file and review the job definition format.

    View an explanation of each crontab field by executing the following command.

    sudo cat /etc/crontab

    Review the following reference section from the output to understand the job definition format.

    # Example of job definition:
    # .---------------- minute (0 - 59)
    # |  .------------- hour (0 - 23)
    # |  |  .---------- day of month (1 - 31)
    # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
    # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
    # |  |  |  |  |
    # *  *  *  *  * user-name command to be executed

     

    NOTE: If Okta Access Gateway is not running when the script is called, the backup and replication do not execute. The servers must run continuously, but if administrators must shut them down when the scripts execute, they must change the cron job time.

     

    NOTE: The backup or other crontab jobs do not conflict with any other Okta Access Gateway operations, so administrators can keep the default values unless they need to align with a standard schedule. Administrators must apply the changes to all nodes because the admin node does not transfer the system configuration changes to the worker nodes.


    Related References

    Loading
    Okta Support - Change the Automatic Backup Schedule in Okta Access Gateway