Skip to main content
Skip table of contents

Optional - Automating Backup Script with Cron

NOTE This is one method of automating the backups using the included backup script. 

Optional Automation of Backups with Cron and Expect

To automate the backups, perform the following:

  1. Edit the /etc/crontab file to schedule the tasks:
    # vim /etc/crontab
  2. Enter the schedule you would like to run.

    In this example, we have two entries. One to create the backup that will run at 1AM system time and another to delete more than 10 log files that runs at 2AM system time.

    #Run Backup
    * 1 * * * root /opt/PrimeKey/support/ -e supersecretpassword
    #Prune backups after 10 total
    * 2 * * * root /opt/PrimeKey/support/ --delete-files 10
  3. To output these entries to log files of their own for testing and validation, use the following entries:
    #Run Backup and log to file
    * 1 * * * root /opt/PrimeKey/support/ -e supersecretpassword >> /var/log/cron.log 2>&1 
    #Prune backups after 10 total and log to file
    * 2 * * * root /opt/PrimeKey/support/ --delete-files 10 >> /var/log/cron2.log 2>&1

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.