https://redmine.pfsense.org/
https://redmine.pfsense.org/favicon.ico?1678052116
2020-04-29T09:34:54Z
pfSense bugtracker
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45841
2020-04-29T09:34:54Z
Grischa Zengel
<ul></ul><pre>
$ ls -lah /var/db/rrd
total 7435
drwxr-xr-x 2 nobody wheel 78B Apr 29 14:01 .
drwxr-xr-x 14 root wheel 63B Apr 29 11:29 ..
-rw-r--r-- 1 nobody wheel 144K Oct 25 2019 1_LAN_RFK_GW-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Oct 25 2019 1_WAN_DHCP-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Oct 25 2019 1_WAN_DHCP6-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Dec 5 23:37 3_DSL_PPPOE-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Oct 25 2019 3_SDSL_PPPOE-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Apr 29 14:33 3_VDSL_DHCP6-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Apr 29 14:33 3_VDSL_PPPOE-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Dec 5 23:44 3_VDSL_PPPOE_PPPOE-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Dec 5 23:37 4_GW_VDSL_MODEM-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Apr 29 14:33 4_VDSL_DHCP6-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Apr 29 14:33 4_VDSL_PPPOE-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Oct 25 2019 6_UNUSED_DHCP-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 GW_Inexio10M-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 GW_KV_SAFENET-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 GW_LAN-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Apr 29 14:33 GW_TI_KONNEKTOR-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 OV_DRK_ALZEY_VPNV4-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 OV_ROADWARRIORS_VPNV4-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 OV_SCHUBI_VPNV4-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 OV_ZMT_EXTERN1_VPNV4-quality.rrd
-rw-r--r-- 1 nobody wheel 70K Apr 29 14:33 OV_ZMT_HQ1_VPNV4-quality.rrd
-rw-r--r-- 1 nobody wheel 144K Oct 24 2019 WAN_DHCP-quality.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ipsec-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ipsec-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 lan-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 lan-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt1-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt1-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt10-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt10-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt11-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt11-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt12-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt12-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt13-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt13-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt14-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt14-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt15-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt15-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt16-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt16-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Nov 15 14:44 opt18-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Nov 15 14:44 opt18-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt2-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt2-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt3-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt3-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt4-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt4-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt5-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt5-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt6-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt6-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt7-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt7-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt8-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt8-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt9-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 opt9-traffic.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ovpns4-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ovpns4-traffic.rrd
-rw-r--r-- 1 nobody wheel 49K Apr 29 14:33 ovpns4-vpnusers.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ovpns5-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ovpns5-traffic.rrd
-rw-r--r-- 1 nobody wheel 49K Apr 29 14:33 ovpns5-vpnusers.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ovpns6-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 ovpns6-traffic.rrd
-rw-r--r-- 1 nobody wheel 49K Apr 29 14:33 ovpns6-vpnusers.rrd
-rw-r--r-- 1 nobody wheel 575K Apr 29 14:33 system-mbuf.rrd
-rw-r--r-- 1 nobody wheel 718K Apr 29 14:33 system-memory.rrd
-rw-r--r-- 1 nobody wheel 240K Apr 29 14:33 system-processor.rrd
-rw-r--r-- 1 nobody wheel 240K Apr 29 14:33 system-states.rrd
-rw-r--r-- 1 root wheel 25K Apr 23 18:21 updaterrd.sh
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 wan-packets.rrd
-rw-r--r-- 1 nobody wheel 384K Apr 29 14:33 wan-traffic.rrd
</pre>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45842
2020-04-29T09:35:58Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Not a Bug</i></li></ul><p>Your config must have had older data already inside due to a different bug fixed a while back (like <a class="issue tracker-1 status-3 priority-4 priority-default closed" title="Bug: Two RRDDATA Sections in Restored Config Breaks Unit (Resolved)" href="https://redmine.pfsense.org/issues/8994">#8994</a>) or restoring a config using a method which doesn't support restoring RRD (like putting the config on the memstick when installing). If you skip RRD, there is no way new RRD entries could end up in the backup.</p>
<p>Check your config in /conf/config.xml and see what it has. If you need help fixing that, post on the forum.</p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45846
2020-04-29T10:10:55Z
Grischa Zengel
<ul></ul><p>If it's an evolution problem, why not filtering wrong tags on export?</p>
<p>If you don't skip you will skip the wrong section.<br />Why not skip this section always?</p>
<pre>
/* If the config on disk had rrddata tags already, remove that section first.
* See https://redmine.pfsense.org/issues/8994 */
$data = preg_replace("/<rrddata>.*<\\/rrddata>/", "", $data);
</pre>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45847
2020-04-29T11:06:37Z
Grischa Zengel
<ul></ul><p>If want to make everybody happy:</p>
<p>replace this</p>
<pre>
if ($_POST['backuparea'] !== "rrddata" && !$_POST['donotbackuprrd']) {
$rrd_data_xml = rrd_data_xml();
$closing_tag = "</" . $g['xml_rootobj'] . ">";
/* If the config on disk had rrddata tags already, remove that section first.
* See https://redmine.pfsense.org/issues/8994 */
$data = preg_replace("/<rrddata>.*<\\/rrddata>/", "", $data);
$data = preg_replace("/<rrddata\\/>/", "", $data);
$data = str_replace($closing_tag, $rrd_data_xml . $closing_tag, $data);
}
</pre>
<p>with this</p>
<pre>
/* If the config on disk had rrddata tags already, remove that section first.
* See https://redmine.pfsense.org/issues/8994 */
$data = preg_replace("/<rrddata>.*<\\/rrddata>/", "", $data);
$data = preg_replace("/<rrddata\\/>/", "", $data);
if ($_POST['backuparea'] !== "rrddata" && !$_POST['donotbackuprrd']) {
$rrd_data_xml = rrd_data_xml();
$closing_tag = "</" . $g['xml_rootobj'] . ">";
$data = str_replace($closing_tag, $rrd_data_xml . $closing_tag, $data);
}
</pre>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45850
2020-04-30T04:02:13Z
Viktor Gurov
<ul></ul><p>it's safe to always skip the wrong rrd tags section on export:<br /><a class="external" href="https://github.com/pfsense/pfsense/pull/4297">https://github.com/pfsense/pfsense/pull/4297</a></p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45864
2020-04-30T08:56:55Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>Not a Bug</i> to <i>Pull Request Review</i></li><li><strong>Target version</strong> set to <i>2.5.0</i></li></ul>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45876
2020-04-30T12:24:56Z
Jim Pingle
<ul><li><strong>Target version</strong> changed from <i>2.5.0</i> to <i>2.4.5-p1</i></li></ul>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45909
2020-04-30T12:55:37Z
Jim Pingle
<ul><li><strong>Assignee</strong> set to <i>Jim Pingle</i></li></ul><p>PR Merged & Picked</p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=45910
2020-04-30T12:56:17Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>Pull Request Review</i> to <i>Feedback</i></li></ul>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=46154
2020-05-13T15:46:03Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>New</i></li></ul><p>This doesn't appear to be working. Added some dummy RRD tags to a config and they are still there when downloading a backup. If I also backup RRD, I have two tags.</p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=46165
2020-05-14T08:59:59Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=46166
2020-05-14T09:02:01Z
Jim Pingle
<ul></ul><p>The old code doesn't appear to have ever worked properly as it was. I pushed some changes to the regex which make it work as expected + some improvement in output.</p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=46167
2020-05-14T09:10:07Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Correct regex to remove redundant RRD tags from backup. Fixes #10508 While here, improve regex s..." href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/4213d677f6e665d1b391066c27c17155d8da1699">4213d677f6e665d1b391066c27c17155d8da1699</a>.</p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=46207
2020-05-15T10:24:08Z
Jim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>With an existing <code><rrddata></code> section in the backup, now backups are generated without the tag entirely (skip RRD checked), and with only a single expected tag when exporting with fresh RRD contents.</p>
pfSense - Bug #10508: Backup does not skip all RRD data
https://redmine.pfsense.org/issues/10508?journal_id=63758
2022-11-14T09:46:06Z
Jim Pingle
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-4 priority-default closed" href="/issues/13132">Bug #13132</a>: Multiple ``<sshdata>`` or ``<rrddata>`` sections in ``config.xml`` lead to an XML parsing error during restore</i> added</li></ul>