<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Old CPView_*.dat files on system in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/Old-CPView-dat-files-on-system/m-p/208986#M34625</link>
    <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="python"&gt;- 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: &amp;gt;
        (job_status_failed is not defined)

    - name: Remove found files
      ansible.builtin.file:
        path: "{{ item['path'] }}"
        state: absent
      with_items: "{{ find_results['files'] }}"
      when: &amp;gt;
        (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"&lt;/LI-CODE&gt;
&lt;P&gt;This section is part of our daily ansible backup jobs to keep things clean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 18 Mar 2024 09:57:41 GMT</pubDate>
    <dc:creator>Hugo_vd_Kooij</dc:creator>
    <dc:date>2024-03-18T09:57:41Z</dc:date>
    <item>
      <title>Old CPView_*.dat files on system</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Old-CPView-dat-files-on-system/m-p/208986#M34625</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="python"&gt;- 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: &amp;gt;
        (job_status_failed is not defined)

    - name: Remove found files
      ansible.builtin.file:
        path: "{{ item['path'] }}"
        state: absent
      with_items: "{{ find_results['files'] }}"
      when: &amp;gt;
        (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"&lt;/LI-CODE&gt;
&lt;P&gt;This section is part of our daily ansible backup jobs to keep things clean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Mar 2024 09:57:41 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Old-CPView-dat-files-on-system/m-p/208986#M34625</guid>
      <dc:creator>Hugo_vd_Kooij</dc:creator>
      <dc:date>2024-03-18T09:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Old CPView_*.dat files on system</title>
      <link>https://community.checkpoint.com/t5/General-Topics/Old-CPView-dat-files-on-system/m-p/209052#M34650</link>
      <description>&lt;P&gt;That's a good tip!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 16:56:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/Old-CPView-dat-files-on-system/m-p/209052#M34650</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2024-03-18T16:56:53Z</dc:date>
    </item>
  </channel>
</rss>

