Backup data exclusion not working

Hi, I have problem with exclusion one directory from backup in /etc/backup-data.d/custom.exclude i put:
/var/lib/nethserver/ibay/recordings
but next backup contains this directory and sub directories with files, why?
Is there any test command to test what files will be backed up? So i can test my configs?
Thanks for any advice.

I tested it and it just worked. Your configuration seems to be correct.

Did you create/edit the file /etc/backup-data.d/custom.exclude with a Windows text editor?
How did you check if the excluded directory is backuped?

You may start the backup data process on command line with backup-data and afterwards check the output of backup-data-list that shows you all files in the last backup.

My exclude file:

[root@testserver ~]# cat /etc/backup-data.d/custom.exclude
/var/lib/nethserver/ibay/test

Hi, thanks for reply.
-I’m using mc editor
-then scheduled backup
-backup-data-list |grep hiv (to check that exclusion is working - hiv files are in recordings -but whole recordings are in backup)
I have almost 300GB to backup (without recordings so can’t test this easily).
cat /etc/backup-data.d/custom.exclude /var/lib/nethserver/ibay/recordings[root@my_machine ~]#

backup-data-list |grep /var/lib/nethserver/ibay/recordings
Tue Feb 20 09:18:55 2018 var/lib/nethserver/ibay/recordings/....
Tue Feb 20 09:24:20 2018 var/lib/nethserver/ibay/recordings/....
Tue Feb 20 09:24:20 2018 var/lib/nethserver/ibay/recordings/....
Thu Feb 1 15:17:30 2018 var/lib/nethserver/ibay/recordings/....
Cheers

There may be a line break missing in your /etc/backup-data.d/custom.exclude.

The output of cat /etc/backup-data.d/custom.exclude should look like

[root@testserver ~]# cat /etc/backup-data.d/custom.exclude
/var/lib/nethserver/ibay/test
[root@testserver ~]#

So just open the file in mcedit and go to end of line and hit enter and save it…

2 Likes

I was thinking about this (always put empty line at the end of linux text files) but I’ve read this:

Make sure not to leave empty lines inside edited files.

in Nethserver documentation, i’ll try this anyway. Thanks a lot.

1 Like