Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Hugo_vd_Kooij
Advisor

Old CPView_*.dat files on system

We managed a considerable number of Check Point appliances with a range of versions as not all customer are eager to jump on the upgrade bandwagon.

But on all versions of R80 and R81. (up to and including R81.20) we have seen old CPView_*.dat files left around. Some could be weeks old and some years old. As it seems to be a structural thing I opened a ticket for this and got a good epxplenation for it.

During an upgrade (be it a minor one like a Jumbo Hotfix) or a major one one the system creates a backup of your live cpview database and leaves it on the system in cas you want to investugate and compare performance information before the upgrade.

So in short, unless you want to do this comparison you don't ned them. So you either remove it manually as part of your upgrade or you can hut for them and remove them with the help of Ansible:

- name: Clean old CPView files
  block:
    - name: Find old CPView files
      ansible.builtin.find:
        paths: "/var/log/opt/"
        patterns: "CPViewDB_*.dat"
        recurse: true
      register: find_results
      when: >
        (job_status_failed is not defined)

    - name: Remove found files
      ansible.builtin.file:
        path: "{{ item['path'] }}"
        state: absent
      with_items: "{{ find_results['files'] }}"
      when: >
        (job_status_failed is not defined) and
        (find_results['files'] is defined)
  rescue:
    - name: Fail safe option to prevent job failure
      ansible.builtin.set_fact:
        cleanup_job: "Not needed"

This section is part of our daily ansible backup jobs to keep things clean.

 

<< We make miracles happen while you wait. The impossible jobs take just a wee bit longer. >>
0 Kudos
1 Reply
PhoneBoy
Admin
Admin

That's a good tip!

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events