Archiving and Purging Audit Logs
You can archive and then purge log files from the Junos Space database. You can archive audit logs to the local server or a remote server location.
The Junos Space archive file uses the following naming conventions:
JunosSpaceAuditLog_date_time_id.csv.gz, where date specifies the year, month, and
day, in the format yyyy-mm-dd , time specifies hours, minutes,
and seconds, in the format hh-mm-ss, and id is a 13 character random number that
uniquely identifies each audit log archive file.
This topic includes the following tasks:
- Archiving Audit Logs To a Local Server and Purging the Database
- Archiving Audit Logs To a Remote Server and Purging the Database
Archiving Audit Logs To a Local Server and Purging the Database
You can archive audit logs 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 audit log files to the local server and then purge the audit logs from the database:
- From the task ribbon, select the Audit Logs workspace.
- From the task ribbon, select the View Audit
Logs icon.
The inventory panel displays the audit logs table view.
- From the task ribbon, select the Archive/Purge icon.
The Archive/Purge dialog box is displayed.

- In the Archive Logs Before field, select a date
and time to specify the date up to which all
audit logs are to be archived and then purged from the Junos Space
database. You can only specify date and time in the past.

Note: If you do not specify a date and time in the Archive Logs Before field, Junos Space will archive and then purge from the database all logs generated up to the time that you initiated the operation.
- In the Archive Mode field, select local from the drop-down menu.
Schedule the Junos Space Archive/Purge operation:
- Clear the Schedule at a later time check box (the default) to initiate the Archive/Purge operation when you complete this procedure.
- Select the Schedule at a later time check box to specify a later start date and time for the Archive/Purge operation.

Note: The selected time in the scheduler corresponds to Junos Space server time but using the local time zone of the client computer.
- Click Submit.
The Audit Log Archive and Purge window displays the audit log file name and the location where it will be saved, as shown in the following example.

- Click Continue to archive and purge the
audit logs.
Junos Space displays the Audit Log Archive and Purge Job Information window, as shown in the following illustration.

- To view job details for the Audit Log Archive/Purge operation, click on the Job Id in the Job Information window; otherwise, click OK to close the window.
Archiving Audit Logs To a Remote Server and Purging the Database
You can archive audit logs to remote network hosts or media.
To back up the Junos Space database to a remote host and then purge those logs from the Junos Space database:
- From the task ribbon, select the Audit Logs workspace.
- From the task ribbon, select the View Audit
Logs icon.
The inventory panel displays the audit logs table view.
- From the task ribbon, select the Archive/Purge icon.
The Archive/Purge dialog box is displayed.

- In the Achive Logs Before field, select a date
and time to specify the date up to which all
audit logs are to be archived and then purged from the Junos Space
database. You can only specify date and time in the past.

Note: If you do not specify a date and time in the Archive Logs Before field, Junos Space will archive and then purge from the database all logs generated up to the time that you initiated the operation.
- In the Archive Mode field, select Remote from the drop-down menu.
- Enter a valid user name to access the remote host server.
- Enter a valid password to access the remote host server.
- Reenter the password you entered in the previous step.
- Enter the IP address of the remote host server.
- Enter a directory path on the remote host server
for the archived log files.

Note: The directory path must already exist on the remote host server.
Schedule the Junos Space archive and purge operation:
- Clear the Schedule at a later time check box (the default) to initiate the Archive/Purge operation when you complete this procedure.
- Select the Schedule at a later time check box to specify a later start date and time for the Archive/Purge operation.

Note: The selected time in the scheduler corresponds to Junos Space server time but using the local time zone of the client computer.
- Click Submit.
The Audit Log Archive and Purge window displays the audit log file location and name and the remote server where the files will be copied, as shown in the following example.

- Click Continue to archive and purge the
audit logs.
Junos Space displays the Audit Log Archive and Purge Job Information window, as shown in the following illustration.

- To view job details for the Archive/Purge operation, click on the Job Id in the Job Information window; otherwise, click OK to close the window.

