Re: [Burp-users] Include, exclude and a few mountpoints - can't configure it - SOLVED
Brought to you by:
grke
|
From: <ma...@me...> - 2014-12-20 18:59:06
|
W dniu 2014-12-20 12:21, Graham Keeling napisał(a): > On Fri, Dec 19, 2014 at 11:11:50PM +0100, Marcin Mirosław wrote: >> Hi! >> I've got problem with configuring which directories and file systems >> would be backuped. Please you look at this, client config:" >> password = XX >> >> include = /root/ >> include = /boot/ >> include = /dane/slash/ >> include = / >> >> exclude = /dane/coredumps >> exclude = /tmp >> exclude = /var/tmp/ >> exclude = /var/account/ >> exclude = /var/cache/eix/ >> exclude = /var/lib/clamav/ >> exclude = /var/lib/clamav-unofficial-sigs/ >> exclude = /var/lib/spamassassin/ >> exclude = /var/nagios/spool/ >> exclude = /var/log/atop/ >> exclude = /usr/src/ >> >> nobackup = .nobackup >> " >> >> Mount points are: >> / >> /boot >> /dane/slash >> /root >> >> After creating backup I've got: >> # ls data/t/ >> bin etc lib64 media mnt opt sbin usr var >> So there is no "/boot", "/root", "/dane/slash" directories. There is >> in log: >> 2014-12-19 22:35:35: burp[26512] Client version: 1.4.26 >> 2014-12-19 22:35:35: burp[26512] Begin phase1 (file system scan) >> 2014-12-19 22:35:36: burp[26512] WARNING: Dir: /boot [will not >> descend: file system change not allowed] >> >> 2014-12-19 22:35:36: burp[26512] WARNING: Dir: /dane/bazy [will >> not descend: file system change not allowed] >> >> 2014-12-19 22:35:36: burp[26512] WARNING: Dir: /dane/domeny [will >> not descend: file system change not allowed] >> >> 2014-12-19 22:35:36: burp[26512] WARNING: Dir: /dane/kopie [will >> not descend: file system change not allowed] >> >> 2014-12-19 22:35:36: burp[26512] WARNING: Dir: /dane/slash [will >> not descend: file system change not allowed] >> [...] >> >> >> Now I'm commenting out line "include = /", removing all backups of >> this >> host, creating new one. This is what I've got in backup dir: >> # ls data/t/ >> boot dane root >> >> And log says: >> 2014-12-19 22:58:00: burp[5253] Client version: 1.4.26 >> 2014-12-19 22:58:00: burp[5253] Begin phase1 (file system scan) >> 2014-12-19 22:58:06: burp[5253] End phase1 (file system scan) >> 2014-12-19 22:58:06: burp[5253] Begin phase2 (receive file data) >> >> So now everything is as I expect except for I don't have "/". Meseems >> cross filesystems should be applied to each "include=" separately >> instead to the shortest path. >> >> Thanks, >> Marcin > > Hello, Hello again Graham, hello all, > Some of your findings above could be incorrect, because: > The 'data/t' directory is not trying to be an exact mirror of the > client. For > example, you will not find empty directories in it. I was expecting that empty dir won't be created but mentioned directories wasn't empty. > So, just examining the contents of 'data/t' does not tell you what is > in the > backup. > The 'manifest.gz' file is a list of what has actually been backed up, > but it is > hard to read in comparison with doing some variant of 'burp -a l'. > > However, I think your findings above *are* mostly correct. > When burp reads the 'include's into memory, it sorts them and removes > those > that are subdirectories of others because it doesn't want to back up > the > same things multiple times. > > When you have... > include = /root/ > include = /boot/ > include = /dane/slash/ > ...that is what burp actually does, because they are all separate > paths. > > And, when you have... > include = /root/ > include = /boot/ > include = /dane/slash/ > include = / > ...burp actually does: > include = / > > But, as you say, it will now complain about crossing file systems, > because > you are no longer jumping directly into the mount points. > In order to cross file systems, you need to use one of these options: > > cross_filesystem=[path] > Allow backups to cross a particular filesystem > mountpoint. > > cross_all_filesystems=[0|1] > Allow backups to cross all filesystem mountpoints. > > For example, you probably want something like this: > include = / > cross_filesystem = /boot > cross_filesystem = /dane/bazy > cross_filesystem = /dane/domeny > cross_filesystem = /dane/kopie > cross_filesystem = /dane/slash > cross_filesystem = /root This logic is different than logic seen in other backup stuff so sometimes I'm a little confused:) I prefer backup soft to not cross filesystem mountpoints so further I assume that cross_all_filesystems=0. Let's imagine such situation: mountpoint is: /foo/bar , inside I've got such structure: /foo/bar/xx/yy/zz /foo/bar/aa/bb /foo/bar/cc/dd and I would like to backup _only_ /foo/bar/xx/yy/zz , other dirs shouldn't be backuped. I found that such configuration do want I expect: include = / # I'd like to have also root partition in backup cross_filesystem = /foo/bar include = /foo/bar/xx/yy/zz exclude = /foo/bar/ it isn't hyper clean solution but works:) Graham, what do you think maybe such case should be documented (if isn't yet - but I didn't find similar information)? I'd like to ask about "nobackup" option and burp behavior. I can see that burp doesn't do backup of dir if it finds "nobackup" file inside, it's ok. But I'm wondering about keeping information about such dir in backup, should be keept or not? Example: I've got: /var/cache/man/CACHEDIR.TAG so files and dirs inside /var/cache/man are excluded from backup but what about "/var/cache/man"? Maybe such dir (without subdirs and files) should be keept to have archived owner and permission of mentioned dir? I'd like to ask one more question, what is correct syntax for "exclude_comp"? I tried "exclude_comp = gz bz2 jpeg jpg avi gif png". I tried also: exclude_comp = xz and exclude_comp = .xz but burp still compresses compressed files. Thanks, Marcin |