Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Archiving and Purging Jobs

Over a period of time, the number of job records in the Junos Space Platform database increases. Accumulation of job records in the database could adversely affect the server performance. Because many of the jobs have no relevance after a few hours of their creation or execution, you can purge records of such jobs to avoid strain on the system. If you want to retain the job records for future reference, you can archive the records before purging the records from the system. When you archive the records, the records are saved as a CSV file. You can choose to retain the archived records locally or on a remote server.

You can purge or archive and purge the jobs (successful or not) completed until a time you specify or until the time you initiate the purging or archiving and purging. You must have Super Administrator or Job Administrator role assigned to your account to perform this task.

When you archive jobs locally, the archive files are stored in the default /var/lib/mysql/archive directory on the active Junos Space node. When you archive jobs to a remote server, the archive files are stored in the directory that you specify.

The default filename for an archive is JunosSpaceJobArchive_date_time.zip, where date specifies the year, month, and day, in the yyyy-mm-dd format; and time specifies hours, minutes, and seconds, in the hh-mm-ss format.

This topic includes the following tasks:

Purging Jobs Without Archiving

From Release 17.2R1 onward, Junos Space Platform enables you to purge jobs without archiving the jobs.

To purge Junos Space Platform jobs without archiving the jobs:

  1. On the Junos Space Platform UI, select Jobs > Job Management.

    The Job Management page appears.

  2. Click the Archive/Purge Jobs icon.

    The Archive/Purge Jobs dialog box appears.

  3. Select the job type from the Job Type list. You can select any job type from the list to purge jobs of that job type, or select the All option to purge all jobs from the database.

    Job types of jobs that are already initiated or completed in Junos Space appear on the Job Type list. In-progress and scheduled jobs are not archived.

  4. For the Purge Jobs Before field, select a date and time to specify the time up to which all jobs are to be purged from the Junos Space Platform database. You can specify only a date and time in the past.
    Note:

    If you do not specify a date and time in the Purge Jobs Before field, Junos Space Platform purges or archives and purges all jobs up to the time that you initiate the purge or archive and purge operation.

  5. To purge jobs from all accessible domains, select the Purge Jobs from all accessible domains check box.
  6. Clear the Archive Jobs Before Purging check box. This check box is selected by default.
  7. To schedule the purge operation, select the Schedule at a later time check box and specify a later start date and time for the archive-and-purge operation.
    Note:

    The date and time that you specify in the Archive/Purge Jobs dialog box is the date and time on the client computer. Junos Space Platform maps the specified date and time to the Junos Space server time and schedules the archive-and-purge task.

    If you do not select Schedule at a later time, the specified job is initiated immediately when you click Submit.

  8. Click Submit.

    The Jobs Archive and Purge Job Information page appears.

    Note:

    If sufficient space is not available in the default directory, Junos Space displays an error message and the archive-and-purge task fails.

  9. Perform one of the following actions:
    • To view job details for the archive-and-purge operation, click the Job ID link in the Jobs Archive and Purge Job Information dialog box.

    • Click OK to close the Jobs Archive and Purge Job Information dialog box.

Archiving Jobs to a Local Server and Purging the Jobs from the Database

Before you purge jobs, you can archive the jobs to the local server. The local server is the server that functions as the active node in the Junos Space fabric.

To archive Junos Space Platform jobs to the local server and then purge the jobs from the database:

  1. On the Junos Space Platform UI, select Jobs > Job Management.

    The Job Management page appears.

  2. Click the Archive/Purge Jobs icon.

    The Archive/Purge Jobs dialog box appears.

  3. Select the job type from the Job Type list. You can select any job type from the list to archive jobs of that job type, or select the All option to archive all jobs and then purge them from the database.

    Job types of jobs that are already initiated or completed in Junos Space appear on the Job Type list. In-progress and scheduled jobs are not archived.

  4. For the Purge Jobs Before field, select a date and time to specify the date up to which all jobs are to be archived and purged from the Junos Space Platform database. You can specify only a date and time in the past.
    Note:

    If you do not specify a date and time in the Archive Jobs Before field, Junos Space Platform archives and purges all jobs up to the time that you initiate the archive and purge operation.

  5. To purge jobs from all accessible domains, select the Purge Jobs from all accessible domains check box.

    If you do not select this check box, Junos Space Platform purges jobs only from the current domain of the user.

  6. To archive and purge the jobs, select the Archive Jobs Before Purging check box and complete the following steps:
    1. For the Archive Mode field, select Local from the list.
  7. To schedule the archive-and-purge operation, select the Schedule at a later time check box and specify a later start date and time for the archive-and-purge operation.
    Note:

    The date and time that you specify in the Archive/Purge Jobs dialog box is the date and time on the client computer. Junos Space Platform maps the specified date and time to the Junos Space server time and schedules the archive-and-purge task.

    If you do not select Schedule at a later time, the specified job is initiated immediately when you click Submit.

  8. Click Submit.

    The Jobs Archive and Purge Job Information page appears.

    Note:

    If sufficient space is not available in the default directory, Junos Space displays an error message and the archive-and-purge task fails.

  9. Perform one of the following actions:
    • To view job details for the archive-and-purge operation, click the Job ID link in the Jobs Archive and Purge Job Information dialog box.

    • Click OK to close the Jobs Archive and Purge Job Information dialog box.

Archiving Jobs to a Remote Server and Purging the Jobs from the Database

You can also choose to archive jobs to a remote server before purging the jobs from the Junos Space Platform database. Junos Space Platform uses Secure Copy Protocol (SCP) to copy the files in this case.

To archive jobs to a remote server and then purge them from the Junos Space Platform database:

  1. On the Junos Space Platform UI, select Jobs > Job Management.

    The Job Management page appears.

  2. Click the Archive/Purge Jobs icon. The Archive/Purge Jobs dialog box appears.
  3. Select the job type from the Job Type list. You can select any job type from the list to archive jobs of that job type, or select the All option to archive all jobs and then purge them from the database.

    Job types of jobs that are already initiated or completed in Junos Space appear on the Job Type list. In-progress and scheduled jobs are not archived.

  4. For the Purge Jobs Before field, select a date and time to specify the date up to which all jobs are to be archived and purged from the Junos Space Platform database. You can specify only a date and time in the past.
    Note:

    If you do not specify a date and time in the Archive Jobs Before field, Junos Space Platform archives and then purges from the database all jobs up to the time that you initiated the operation.

  5. To purge jobs from all accessible domains, select the Purge Jobs from all accessible domains check box.

    If you do not select this check box, Junos Space Platform purges jobs only from the current domain of the user.

  6. To archive and purge the jobs, select the Archive Jobs Before Purging check box and complete the following steps:
    1. For the Archive Mode field, select Local from the list.
    2. In the User field, enter a valid username to access the remote host server.
    3. In the Password field, enter a valid password to access the remote host server.
    4. In the Confirm Password field, reenter the password you entered in the previous step.
    5. In the Machine IP field, enter the IP address of the remote host server.
    6. In the Directory field, enter a directory path on the remote host server for the archived files.
      Note:

      The directory path must already exist on the remote host server. If sufficient space is not available in the specified directory, Junos Space displays an error message and the archive-and-purge task fails.

  7. To schedule the archive-and-purge operation, select the Schedule at a later time check box and specify a later start date and time for the archive-and-purge operation.
    Note:

    The date and time that you specify in the Archive/Purge Jobs dialog box is the date and time on the client computer. Junos Space Platform maps the specified date and time to the Junos Space server time and schedules the archive-and-purge task.

    If you do not select Schedule at a later time, the specified job is initiated immediately when you click Submit.

  8. Click Submit.

    The Jobs Archive and Purge dialog box displays the file location and the name of the remote server.

  9. Click Continue in the Jobs Archive and Purge dialog box to archive and purge the jobs.

    Junos Space Platform displays the Jobs Archive and Purge Job Information dialog box.

  10. Perform one of the following actions:
    • To view job details for the archive-and-purge operation, click the Job ID link in the Jobs Archive and Purge Job Information dialog box.

    • Click OK to close the Jobs Archive and Purge Job Information dialog box.