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:
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:
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: