[Borgbackup] Excludes are ignored

Yves Goergen nospam.list at unclassified.de
Thu Dec 17 11:06:23 EST 2020


That didn't work. Whatever I tried, nothing was excluded in the actual 
backup.

Until borg has that feature, I found a workaround that doesn't need borg 
backup to support excludes. Since I always create an LVM snapshot, I 
delete all files to be excluded from that snapshot before running borg. 
So borg will never see what it should not include.

This also has the benefit that the display of the data size to read is 
more accurate (df -h /mnt/snapshot) because it also only sees the files 
to include and nothing else.


BTW, can somebody please configure the mailing list so that I also 
receive a copy of what I send to it? Mailing lists used to do that in 
the past. Without these messages, my thread tree is very incomplete and 
it's hard to follow conversations.

-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



More information about the Borgbackup mailing list