From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 4/7] backup.pl: Update to migrate rrd directories for collectd-5.x Date: Wed, 25 Dec 2024 14:48:25 +0100 Message-ID: <20241225134828.6231-4-adolf.belka@ipfire.org> In-Reply-To: <20241225134828.6231-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7437930221428180034==" List-Id: --===============7437930221428180034== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- config/backup/backup.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 3b10b8707..fb7b210db 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -258,6 +258,16 @@ restore_backup() { if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf fi + + # Create collectd 4.x to 5.x migration script from rrd contents, run the sc= ript that + # was created and then remove the old interface directory if it is present = as it will + # be empty after the migration has been carried out. + /var/ipfire/collectd-migrate-4-to-5.pl --indir /var/log/rrd/ > /tmp/rrd-mig= rate.sh + sh /tmp/rrd-migrate.sh >/dev/null 2>&1 + if [ -d /var/log/rrd/collectd/localhost/interface/ ]; then + rm -Rf /var/log/rrd/collectd/localhost/interface/ + fi + return 0 } =20 --=20 2.47.1 --===============7437930221428180034==--