[Borgbackup] Excludes are ignored
Bzzzz
lazyvirus at gmx.com
Tue Dec 15 16:54:10 EST 2020
On Tue, 15 Dec 2020 22:06:29 +0100
Yves Goergen <nospam.list at unclassified.de> wrote:
> Hello,
Biscotte,
> I've got a problem with excluding files in a borg backup. The version
> is 1.1.14 on Ubuntu Linux (multiple versions).
>
> The command looks like this:
>
> borg create
> ssh://user@your-storagebox.de:23/./backup-name::'{now:%Y-%m-%dT%H-%M}'
> /mnt/backup_snapshot --exclude /mnt/backup_snapshot/lost+found
> --exclude /mnt/backup_snapshot/tmp
> --exclude /mnt/backup_snapshot/var/mail
>
> Or this:
>
> borg create
> ssh://user@your-storagebox.de:23/./backup-name::'{now:%Y-%m-%dT%H-%M}'
> /mnt/backup_snapshot --exclude lost+found --exclude tmp --exclude
> var/mail
>
> But all these excluded files are completely /included/ in the backup.
> The /mnt/backup_snapshot directory is a LVM snapshot mount directory,
> it's a snapshot copy of /.
I store all exclusions in, using the switch:
--exclude-from <filename>
that is working well - it needs a little trick to also avoid keeping
hidden files (/.?* termination)
Here's a sample of it:
# FROM :
https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-patterns
# NB...:Default style is: fm:/path/bla - fair enough for my needs.
#
/lost+found/*
/lost+found/.?*
/BACKUP/*
/BACKUP/.?*
/bin/lost+found/*
/bin/lost+found/.?*
/BORG/*
/BORG/.?*
/boot/lost+found/*
/boot/lost+found/.?*
/dev/*
/dev/.?*
[…]
/home/*/.cache/chromium/*
/home/*/.cache/mozilla/firefox/*
/home/*/.claws-mail/tmp/*
/home/*/.googleearth/Cache/*
[…]
/NFS/*/*
/NFS/*/.?*
/proc/*
/run/*
/srv/*
/sys/*
Jean-Yves
More information about the Borgbackup
mailing list