]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
backup.pl: Fix issue with University of Toulouse change
authorAdolf Belka <adolf.belka@ipfire.org>
Fri, 5 Jun 2026 16:40:19 +0000 (18:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jun 2026 09:33:55 +0000 (09:33 +0000)
- Some months ago University of Toulouse changed any lists with a different French and
   English name from being duplicate files to being a file plus a symlink.
- Doing a restore from a backup with symlinks into a system with only file names
   resulted in a symlink trying to be created when a file with the same name already
   existed causing a failure.
- This failure stopped the restore part way through resulting in only a partial restore.
- This patch removes all entries in the urlfilter blacklists, allowing all restored
   entries to be created.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/backup/backup.pl

index 7454ae7624ee581ab40c89d2b8044a17160d3748..417d33f40b82daee65acfaa302a6be8bc01933b3 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2025  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2026  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -83,6 +83,10 @@ restore_backup() {
        # certificates being left in directory after a restore
        rm -f /var/ipfire/ovpn/certs/*
 
+       # remove all previous blacklist entries from urlfilter
+       # to prevent any clashes between symlinks and files
+       rm -Rf /var/ipfire/urrlfilter/blacklists/*
+
        # Extract backup
        if ! tar xvzpf "${filename}" -C / \
                        --exclude-from="/var/ipfire/backup/exclude" \