[Borgbackup] Excludes are ignored

Marian Beermann public at enkore.de
Thu Dec 17 13:12:51 EST 2020


Hi Yves,

this very much sounds like a bug, since --exclude generally works as you
used it here and there should be no difference in the files borg
processes between --dry-run and not--dry-run.

If you have a GitHub account, please report this as a bug; If you don't
have a GitHub account, I'll create one.

Cheers, Marian

Am 16.12.20 um 18:29 schrieb Yves Goergen:
> I've tested some more. And the result is that borg includes files in the
> backup that are not included in the --list option.
> 
> When I do this:
> 
>> borg create --list --dry-run $REPOSITORY /home/me --exclude
>> '/home/me/BufrReader/archive' 2>&1 |less
> 
> Then no files within /home/me/BufrReader/archive/ appear in the list.
> But when I do this:
> 
>> borg create -v --stats --progress $REPOSITORY /home/me --exclude
>> '/home/me/BufrReader/archive'
> 
> Then I see all those files showing up. And that's many of them
> (thousands). Is there any difference between lists/dry-run and the real
> operation?
> 
> -Yves
> 
> 
> -------- Ursprüngliche Nachricht --------
> Von: Fabio Pedretti <fabio.pedretti at unibs.it>
> Gesendet: Mittwoch, 16. Dezember 2020, 07:55 MEZ
> Betreff: [Borgbackup] Excludes are ignored
> 
> Try replacing
> --exclude var/mail
> with
> --exclude '*/var/mail'
> 
> Il mar 15 dic 2020, 22:30 Yves Goergen <nospam.list at unclassified.de
> <mailto:nospam.list at unclassified.de>> ha scritto:
> 
>     Hello,
> 
>     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've seen the documentation pages about create
>     <https://borgbackup.readthedocs.io/en/stable/usage/create.html> and
>     patterns
>     <https://borgbackup.readthedocs.io/en/stable/usage/help.html>, but
>     the patterns text is too much internal-dev talk for me, I don't know
>     many of the words you use there.
> 
>     So in plain English, what should I provide in the --exclude option?
>     An absolute path to where borg will read the file from? A relative
>     path, relative to where I tell it to start reading from? Or what?
> 
>     Using a separate exclude file is not an option for me because all
>     parameters to borg are specified in a bash script.
> 
>     -Yves
>     _______________________________________________
>     Borgbackup mailing list
>     Borgbackup at python.org <mailto:Borgbackup at python.org>
>     https://mail.python.org/mailman/listinfo/borgbackup
> 
> 
> 
> Informativa sulla Privacy: http://www.unibs.it/node/8155
> 
> _______________________________________________
> Borgbackup mailing list
> Borgbackup at python.org
> https://mail.python.org/mailman/listinfo/borgbackup



More information about the Borgbackup mailing list