Re: [Bacula-users] preserving ACL permissions
On Monday 2019-07-29 15:26:51 Adam Weremczuk wrote: > Hi all, > > Switching options around did the trick and my ACLs meta data is now > backed up. > > Unfortunately it only applies to files and folders that have been > modified so my backups are not complete yet. > > I'm hoping the next full run (scheduled for Wednesday) will have them > all. > > Martin was also right about the config change not resulting in a full > backup (just incremental) so my tape hasn't run out of space. > > Thanks everyone! > > Adam Nice to hear. Thank you for reporting the results. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
Hi all, Switching options around did the trick and my ACLs meta data is now backed up. Unfortunately it only applies to files and folders that have been modified so my backups are not complete yet. I'm hoping the next full run (scheduled for Wednesday) will have them all. Martin was also right about the config change not resulting in a full backup (just incremental) so my tape hasn't run out of space. Thanks everyone! Adam On 25/07/19 12:18, Josip Deanovic wrote: On Thursday 2019-07-25 12:11:58 Martin Simmons wrote: I don't think this change will cause a full backup -- only changes to File= and Plugin= lines will do that. Curious to hear if this is correct. :-) ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 09:58:18 Chandler wrote: > Adam Weremczuk wrote on 7/25/19 04:42: > > Does it mean it will apply missing attributes in an incremental > > manner? > > You could always minimize your FileSet resource to backup just 1 or a > few files with ACL's, just for testing. Then once those restore fine > you can go back to your full set. Or maybe to create another, smaller job for testing. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
Adam Weremczuk wrote on 7/25/19 04:42: Does it mean it will apply missing attributes in an incremental manner? You could always minimize your FileSet resource to backup just 1 or a few files with ACL's, just for testing. Then once those restore fine you can go back to your full set. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 16:06, Kern Sibbald wrote: Hello, I saw that someone mentioned using Samba. Bacula does not save and restore acl across NFS or Samba. To do so you must have a filesystem that is mounted locally on the File Daemon. Best regards, Kern Hi Kern, Issue with missing ACLs only apply to locally mounted directories (ext4 on LVM on hardware RAID). I discovered the problem on restore of /var/lib/samba as it prevented samba from starting. There are numerous other local paths on the same client subject to the same issue. I shall find out in just a couple of hours if the config change suggested by Martin has made any difference. Regards, Adam ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
Hello, I saw that someone mentioned using Samba. Bacula does not save and restore acl across NFS or Samba. To do so you must have a filesystem that is mounted locally on the File Daemon. Best regards, Kern On 7/25/19 12:08 PM, Adam Weremczuk wrote: On 25/07/19 10:55, Martin Simmons wrote: Yes, the FileSet may be the problem -- try reordering the Options clauses so that the "default" Options clause containing xattrsupport etc is the last one. The manual says: "However, one additional point is that in the case that no match was found, Bacula will use the options found in the last Options resource. As a consequence, if you want a particular set of "default" options, you should put them in an Options resource after any other Options." __Martin Thanks Martin, Would you be kind enough to re-craft my config file based on the original? It's an important server with about 800GB of data being backed up over several hours. Therefore I would much prefer to avoid any horrible mistakes. I'm assuming any filest change forces the next backup to be full regardless of the schedule? ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Thu, 25 Jul 2019 16:32:07 +0200, Josip Deanovic said: > > On Thursday 2019-07-25 13:12:49 Martin Simmons wrote: > > Only the basic unix permissions are stored in the database, not the acl > > and xattr info. > > I have just checked the database on bacula 7.0.5 and I don't think > permissions are stored in the database either. > > Also, if you try to do the bextract which doesn't use database, > you will get the files with unix permissions applied. Yes, that's true: restore and bextract use the permissions from the media. > For some reason I was convinced that they are stored in the database. Actually, you were correct! The database also contains the permissions in the File.LStat field, which is used for various non-restore purposes such as verify-to-catalog jobs and the Accurate backup option. __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
I think you need to provide the director config file not the client config file i.e. bacula-dir -t /etc/bacula/bacula-dir.conf On 25/07/2019 15:28, Adam Weremczuk wrote: On 25/07/19 12:16, Josip Deanovic wrote: When you perform some change you can always test the configuration with the bacula-dir -t command. I get the following for every single client conf: bacula-dir -t /etc/bacula/clients/server.conf 25-Jul 15:19 bacula-dir: ERROR TERMINATION at parse_conf.c:479 Config error: Could not find config Resource server_catalog referenced on line 10 : Catalog = server_catalog It's defined in /etc/bacula/bacula-dir.conf # -- # Catalog Definitions # -- Catalog { Name = server_catalog DB Name = bacula user = bacula password = "" } Apart from recently discovered missing ACL on one client issue all backups have been generally running fine. Why am I seeing this error? ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 15:40, Josip Deanovic wrote: If I understand correctly you have run bacula-dir -t with the the client config excerpt. You should run bacula-dir -t with the main bacula configuration file. Yes, bacula-dir -t /etc/bacula/bacula-dir.conf doesn't complain about anything so I should be good to go. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 15:28:09 Adam Weremczuk wrote: > On 25/07/19 12:16, Josip Deanovic wrote: > > When you perform some change you can always test the configuration > > with the bacula-dir -t command. > > I get the following for every single client conf: > > bacula-dir -t /etc/bacula/clients/server.conf > 25-Jul 15:19 bacula-dir: ERROR TERMINATION at parse_conf.c:479 > Config error: Could not find config Resource server_catalog referenced > on line 10 : Catalog = server_catalog > > It's defined in /etc/bacula/bacula-dir.conf If I understand correctly you have run bacula-dir -t with the the client config excerpt. You should run bacula-dir -t with the main bacula configuration file. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 13:12:49 Martin Simmons wrote: > Only the basic unix permissions are stored in the database, not the acl > and xattr info. I have just checked the database on bacula 7.0.5 and I don't think permissions are stored in the database either. Also, if you try to do the bextract which doesn't use database, you will get the files with unix permissions applied. For some reason I was convinced that they are stored in the database. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 12:16, Josip Deanovic wrote: When you perform some change you can always test the configuration with the bacula-dir -t command. I get the following for every single client conf: bacula-dir -t /etc/bacula/clients/server.conf 25-Jul 15:19 bacula-dir: ERROR TERMINATION at parse_conf.c:479 Config error: Could not find config Resource server_catalog referenced on line 10 : Catalog = server_catalog It's defined in /etc/bacula/bacula-dir.conf # -- # Catalog Definitions # -- Catalog { Name = server_catalog DB Name = bacula user = bacula password = "" } Apart from recently discovered missing ACL on one client issue all backups have been generally running fine. Why am I seeing this error? ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Thu, 25 Jul 2019 13:36:20 +0200, Josip Deanovic said: > > Josip DeanovicOn Thursday 2019-07-25 13:18:31 wrote: > > On Thursday 2019-07-25 12:11:58 Martin Simmons wrote: > > > I don't think this change will cause a full backup -- only changes to > > > File= and Plugin= lines will do that. > > > > Curious to hear if this is correct. :-) > > Just checked the documentation. > @Martin, I think you are right. > > > https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION00147 > > "Any change to the list of the included files will cause Bacula to > automatically create a new FileSet (defined by the name and an MD5 > checksum of the Include/Exclude contents). Each time a new FileSet is > created, Bacula will ensure that the next backup is always a Full save." Yes, or see the source code for details :-) __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Thu, 25 Jul 2019 14:03:09 +0200, Josip Deanovic said: > > On Thursday 2019-07-25 12:42:13 Adam Weremczuk wrote: > > On 25/07/19 12:36, Josip Deanovic wrote: > > > Just checked the documentation. > > > @Martin, I think you are right. > > > > > > > > > https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director > > > .html#SECTION00147 > > > > > > "Any change to the list of the included files will cause Bacula to > > > automatically create a new FileSet (defined by the name and an MD5 > > > checksum of the Include/Exclude contents). Each time a new FileSet is > > > created, Bacula will ensure that the next backup is always a Full > > > save." > > Does it mean it will apply missing attributes in an incremental manner? > > If you're wrong I will run out of tape space :-( > > If I am not mistaken you only have issue with missing file attributes? > > That info is stored in the database. Only the basic unix permissions are stored in the database, not the acl and xattr info. __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 12:42:13 Adam Weremczuk wrote: > On 25/07/19 12:36, Josip Deanovic wrote: > > Just checked the documentation. > > @Martin, I think you are right. > > > > > > https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director > > .html#SECTION00147 > > > > "Any change to the list of the included files will cause Bacula to > > automatically create a new FileSet (defined by the name and an MD5 > > checksum of the Include/Exclude contents). Each time a new FileSet is > > created, Bacula will ensure that the next backup is always a Full > > save." > Does it mean it will apply missing attributes in an incremental manner? > If you're wrong I will run out of tape space :-( If I am not mistaken you only have issue with missing file attributes? That info is stored in the database. But I cannot guarantee unless until I try it myself. :-| -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 12:39, Josip Deanovic wrote: About the deletion of old jobs... What kind of storage type are using? Are you using real tapes or files on disk? See my "[Bacula-users] deleting data written to volume" post from about an hour ago. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 12:36, Josip Deanovic wrote: Just checked the documentation. @Martin, I think you are right. https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION00147 "Any change to the list of the included files will cause Bacula to automatically create a new FileSet (defined by the name and an MD5 checksum of the Include/Exclude contents). Each time a new FileSet is created, Bacula will ensure that the next backup is always a Full save." Does it mean it will apply missing attributes in an incremental manner? If you're wrong I will run out of tape space :-( ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 12:31:42 Adam Weremczuk wrote: > On 25/07/19 12:18, Josip Deanovic wrote: > > On Thursday 2019-07-25 12:11:58 Martin Simmons wrote: > >> I don't think this change will cause a full backup -- only changes to > >> File= and Plugin= lines will do that. > > > > Curious to hear if this is correct. :-) > > Thanks Josip. > I'm leaning towards agreeing with you on this. > If ACLs were not part of the last full backup and I'm going to change > that then it would make sense for a full backup to be forced. > That's why I'd like to delete the previous full first (which run last > night). > See my other post from today. > That also should force next full and you might never find out if you > were right :) > I simply don't have space on tape to squeeze 2 full ones. > Deletion should be easier than fiddling with schedules and juggling > tapes. No, I think Martin was right but please to confirm when you run it. This is the excerpt from the documentation: "Any change to the list of the included files will cause Bacula to automatically create a new FileSet (defined by the name and an MD5 checksum of the Include/Exclude contents). Each time a new FileSet is created, Bacula will ensure that the next backup is always a Full save." About the deletion of old jobs... What kind of storage type are using? Are you using real tapes or files on disk? -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
Josip DeanovicOn Thursday 2019-07-25 13:18:31 wrote: > On Thursday 2019-07-25 12:11:58 Martin Simmons wrote: > > I don't think this change will cause a full backup -- only changes to > > File= and Plugin= lines will do that. > > Curious to hear if this is correct. :-) Just checked the documentation. @Martin, I think you are right. https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION00147 "Any change to the list of the included files will cause Bacula to automatically create a new FileSet (defined by the name and an MD5 checksum of the Include/Exclude contents). Each time a new FileSet is created, Bacula will ensure that the next backup is always a Full save." -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 12:18, Josip Deanovic wrote: On Thursday 2019-07-25 12:11:58 Martin Simmons wrote: I don't think this change will cause a full backup -- only changes to File= and Plugin= lines will do that. Curious to hear if this is correct. :-) Thanks Josip. I'm leaning towards agreeing with you on this. If ACLs were not part of the last full backup and I'm going to change that then it would make sense for a full backup to be forced. That's why I'd like to delete the previous full first (which run last night). See my other post from today. That also should force next full and you might never find out if you were right :) I simply don't have space on tape to squeeze 2 full ones. Deletion should be easier than fiddling with schedules and juggling tapes. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 12:11:58 Martin Simmons wrote: > I don't think this change will cause a full backup -- only changes to > File= and Plugin= lines will do that. Curious to hear if this is correct. :-) -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 11:08:53 Adam Weremczuk wrote: > On 25/07/19 10:55, Martin Simmons wrote: > > Yes, the FileSet may be the problem -- try reordering the Options > > clauses so that the "default" Options clause containing xattrsupport > > etc is the last one. > > > > The manual says: "However, one additional point is that in the case > > that no match was found, Bacula will use the options found in the > > last Options resource. As a consequence, if you want a particular set > > of "default" options, you should put them in an Options resource > > after any other Options." > > > > __Martin > > Thanks Martin, > Would you be kind enough to re-craft my config file based on the > original? It's an important server with about 800GB of data being > backed up over several hours. > Therefore I would much prefer to avoid any horrible mistakes. > I'm assuming any filest change forces the next backup to be full > regardless of the schedule? What Martin wants to say is probably that you would need to replace this: FileSet { Name = server_fileset Include { Options { signature = SHA1 ##sparse = yes xattrsupport = yes aclsupport = yes noatime = yes checkfilechanges = yes } Options { exclude = yes # No need to backup cached apt files (but keep directories!!) regexfile = "^/var/cache/apt/.*\.(bin|deb)$" regexfile = ... regexdir = ... regexdir = ... regexdir = ... } File = "/" File = "/boot" File = "/var" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } Exclude { File = "/var/cache/apache2/mod_disk_cache" File = "/var/tmp" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } } with this: FileSet { Name = server_fileset Include { Options { exclude = yes # No need to backup cached apt files (but keep directories!!) regexfile = "^/var/cache/apt/.*\.(bin|deb)$" regexfile = ... regexdir = ... regexdir = ... regexdir = ... } Options { signature = SHA1 ##sparse = yes xattrsupport = yes aclsupport = yes noatime = yes checkfilechanges = yes } File = "/" File = "/boot" File = "/var" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } Exclude { File = "/var/cache/apache2/mod_disk_cache" File = "/var/tmp" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } } I have just switched two "Options" blocks. And yes, this will trigger full backup. When you perform some change you can always test the configuration with the bacula-dir -t command. If that doesn't scream with any warnings you can reload the configuration from bconsole using the reload command. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Thu, 25 Jul 2019 11:08:53 +0100, Adam Weremczuk said: > > On 25/07/19 10:55, Martin Simmons wrote: > > > Yes, the FileSet may be the problem -- try reordering the Options clauses so > > that the "default" Options clause containing xattrsupport etc is the last > > one. > > > > The manual says: "However, one additional point is that in the case that no > > match was found, Bacula will use the options found in the last Options > > resource. As a consequence, if you want a particular set of "default" > > options, > > you should put them in an Options resource after any other Options." > > > > __Martin > Thanks Martin, > Would you be kind enough to re-craft my config file based on the original? > It's an important server with about 800GB of data being backed up over > several hours. I can't be responsible for your data, but try something like this (based on your email from July 24): FileSet { Name = server_fileset Include { Options { exclude = yes # No need to backup cached apt files (but keep directories!!) regexfile = "^/var/cache/apt/.*\.(bin|deb)$" regexfile = ... regexdir = ... regexdir = ... regexdir = ... } Options { signature = SHA1 ##sparse = yes xattrsupport = yes aclsupport = yes noatime = yes checkfilechanges = yes } File = "/" File = "/boot" File = "/var" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } Exclude { File = "/var/cache/apache2/mod_disk_cache" File = "/var/tmp" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } } > Therefore I would much prefer to avoid any horrible mistakes. All important backups must be tested periodically using restore! > I'm assuming any filest change forces the next backup to be full > regardless of the schedule? I don't think this change will cause a full backup -- only changes to File= and Plugin= lines will do that. __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 11:44, Josip Deanovic wrote: Additionally, the first one seems to be linked with Eset antivirus library. Well spotted :) ESET Node32 was installed much later and it's just a silly experiment. I wouldn't thought it could affect operations of Bacula client. The suspicion is my config for the failing client is incorrectly structured. I'm hoping for some guru to help me to modify it as certain errors could cost dearly... ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Thursday 2019-07-25 10:15:46 Adam Weremczuk wrote: > On 25/07/19 03:52, Josip Deanovic wrote: > > Can you also check ldd bacula-fd on both clients (working and not > > working)? > > > > I cannot check now if samba is using libacl or its own implementation. > > client with working ACL backup/restore: [...] > client with broken ACL backup/restore: [...] > Missing ACLs in restores are not specific to samba. > I've tried it for other folders and the behavior was the same (i.e. > missing ACLs when restored). That looks ok to me. Both clients have everything they need and there are no missing libraries. Additionally, the first one seems to be linked with Eset antivirus library. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 10:55, Martin Simmons wrote: Yes, the FileSet may be the problem -- try reordering the Options clauses so that the "default" Options clause containing xattrsupport etc is the last one. The manual says: "However, one additional point is that in the case that no match was found, Bacula will use the options found in the last Options resource. As a consequence, if you want a particular set of "default" options, you should put them in an Options resource after any other Options." __Martin Thanks Martin, Would you be kind enough to re-craft my config file based on the original? It's an important server with about 800GB of data being backed up over several hours. Therefore I would much prefer to avoid any horrible mistakes. I'm assuming any filest change forces the next backup to be full regardless of the schedule? ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Thu, 25 Jul 2019 10:19:21 +0100, Adam Weremczuk said: > > On 24/07/19 16:49, Martin Simmons wrote: > > > What happens if you take a backup from the broken client and restore it on > > the > > working client? And vice versa? > Restore from the broken client to a working one misses ACLs. > Restore from working client to broken shows them correctly. > > Could it be something silly such incorrect bracketing or indentation in > the client config file? > I've attached the entire structure to one of my previous posts. Yes, the FileSet may be the problem -- try reordering the Options clauses so that the "default" Options clause containing xattrsupport etc is the last one. The manual says: "However, one additional point is that in the case that no match was found, Bacula will use the options found in the last Options resource. As a consequence, if you want a particular set of "default" options, you should put them in an Options resource after any other Options." __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 24/07/19 16:49, Martin Simmons wrote: What happens if you take a backup from the broken client and restore it on the working client? And vice versa? Restore from the broken client to a working one misses ACLs. Restore from working client to broken shows them correctly. Could it be something silly such incorrect bracketing or indentation in the client config file? I've attached the entire structure to one of my previous posts. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 25/07/19 03:52, Josip Deanovic wrote: Can you also check ldd bacula-fd on both clients (working and not working)? I cannot check now if samba is using libacl or its own implementation. client with working ACL backup/restore: ldd /usr/sbin/bacula-fd linux-vdso.so.1 => (0x7fffb519b000) libesets_pac.so => /usr/lib/libesets_pac.so (0x7f2deecfa000) libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x7f2deea4b000) liblzo2.so.2 => /lib/x86_64-linux-gnu/liblzo2.so.2 (0x7f2dee829000) libbacfind-5.2.6.so => /usr/lib/bacula/libbacfind-5.2.6.so (0x7f2dee61b000) libbacpy-5.2.6.so => /usr/lib/bacula/libbacpy-5.2.6.so (0x7f2dee417000) libbaccfg-5.2.6.so => /usr/lib/bacula/libbaccfg-5.2.6.so (0x7f2dee20c000) libbac-5.2.6.so => /usr/lib/bacula/libbac-5.2.6.so (0x7f2dedfb1000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f2dedd97000) libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x7f2ded809000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f2ded5ec000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f2ded222000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f2ded01e000) /lib64/ld-linux-x86-64.so.2 (0x7f2deec53000) libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x7f2dece19000) libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x7f2decc0f000) libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x7f2deca09000) libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x7f2dec7a) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x7f2dec35c000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f2debfda000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f2debcd1000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x7f2debace000) libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x7f2deb8b5000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f2deb69f000) client with broken ACL backup/restore: ldd /usr/sbin/bacula-fd linux-vdso.so.1 => (0x7fff479ff000) libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x7f584948c000) libbacfind-5.2.6.so => /usr/lib/bacula/libbacfind-5.2.6.so (0x7f584927e000) libbacpy-5.2.6.so => /usr/lib/bacula/libbacpy-5.2.6.so (0x7f5849079000) libbaccfg-5.2.6.so => /usr/lib/bacula/libbaccfg-5.2.6.so (0x7f5848e6e000) libbac-5.2.6.so => /usr/lib/bacula/libbac-5.2.6.so (0x7f5848c13000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x7f58489fb000) libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x7f58484fb000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x7f58482f8000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x7f58480ef000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f5847ed3000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x7f5847ccf000) libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x7f5847ac3000) libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x7f5847864000) libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x7f584748) libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x7f584727b000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x7f5846f74000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x7f5846cf2000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7f5846adb000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x7f5846751000) libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x7f584654c000) /lib64/ld-linux-x86-64.so.2 (0x7f58496a9000) libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x7f5846333000) Missing ACLs in restores are not specific to samba. I've tried it for other folders and the behavior was the same (i.e. missing ACLs when restored). ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Wednesday 2019-07-24 16:39:02 Adam Weremczuk wrote: > On 24/07/19 16:33, Adam Weremczuk wrote: > > On 24/07/19 16:24, Martin Simmons wrote: > >> Have you checked if acl and xattr support is compiled into the > >> bacula-fd? > >> > >> objdump -T ...path..to../bacula-fd | egrep 'acl|xattr' > >> > >> __Martin > > > > objdump -T /usr/sbin/bacula-fd | egrep 'acl|xattr' > > DF *UND* ACL_1.0 acl_valid > > DF *UND* ACL_1.0 > > acl_get_file DF *UND* > > GLIBC_2.3 lgetxattr DF *UND* > > ACL_1.0 acl_free DF *UND* > > ACL_1.0 acl_from_text DF > > *UND* ACL_1.0 > > acl_get_tag_type > > DF *UND* ACL_1.0 > > acl_get_entry DF *UND* > > GLIBC_2.3 lsetxattr DF *UND* > > ACL_1.0 acl_set_file DF > > *UND* ACL_1.0 acl_to_text > > DF *UND* GLIBC_2.3 llistxattr > > DF *UND* ACL_1.0 > > acl_delete_def_file > > I'm getting identical output on the other client ALC backups worked on. Can you also check ldd bacula-fd on both clients (working and not working)? I cannot check now if samba is using libacl or its own implementation. -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Wed, 24 Jul 2019 16:39:02 +0100, Adam Weremczuk said: > > On 24/07/19 16:33, Adam Weremczuk wrote: > > > On 24/07/19 16:24, Martin Simmons wrote: > > > >> Have you checked if acl and xattr support is compiled into the > >> bacula-fd? > >> > >> objdump -T ...path..to../bacula-fd | egrep 'acl|xattr' > >> > >> __Martin > >> > > > > objdump -T /usr/sbin/bacula-fd | egrep 'acl|xattr' > > DF *UND* ACL_1.0 acl_valid > > DF *UND* ACL_1.0 acl_get_file > > DF *UND* GLIBC_2.3 lgetxattr > > DF *UND* ACL_1.0 acl_free > > DF *UND* ACL_1.0 acl_from_text > > DF *UND* ACL_1.0 > > acl_get_tag_type > > DF *UND* ACL_1.0 acl_get_entry > > DF *UND* GLIBC_2.3 lsetxattr > > DF *UND* ACL_1.0 acl_set_file > > DF *UND* ACL_1.0 acl_to_text > > DF *UND* GLIBC_2.3 llistxattr > > DF *UND* ACL_1.0 > > acl_delete_def_file > I'm getting identical output on the other client ALC backups worked on. That looks correct (i.e. it is compiled in). What happens if you take a backup from the broken client and restore it on the working client? And vice versa? __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 24/07/19 16:33, Adam Weremczuk wrote: On 24/07/19 16:24, Martin Simmons wrote: Have you checked if acl and xattr support is compiled into the bacula-fd? objdump -T ...path..to../bacula-fd | egrep 'acl|xattr' __Martin objdump -T /usr/sbin/bacula-fd | egrep 'acl|xattr' DF *UND* ACL_1.0 acl_valid DF *UND* ACL_1.0 acl_get_file DF *UND* GLIBC_2.3 lgetxattr DF *UND* ACL_1.0 acl_free DF *UND* ACL_1.0 acl_from_text DF *UND* ACL_1.0 acl_get_tag_type DF *UND* ACL_1.0 acl_get_entry DF *UND* GLIBC_2.3 lsetxattr DF *UND* ACL_1.0 acl_set_file DF *UND* ACL_1.0 acl_to_text DF *UND* GLIBC_2.3 llistxattr DF *UND* ACL_1.0 acl_delete_def_file I'm getting identical output on the other client ALC backups worked on. ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 24/07/19 16:24, Martin Simmons wrote: Have you checked if acl and xattr support is compiled into the bacula-fd? objdump -T ...path..to../bacula-fd | egrep 'acl|xattr' __Martin objdump -T /usr/sbin/bacula-fd | egrep 'acl|xattr' DF *UND* ACL_1.0 acl_valid DF *UND* ACL_1.0 acl_get_file DF *UND* GLIBC_2.3 lgetxattr DF *UND* ACL_1.0 acl_free DF *UND* ACL_1.0 acl_from_text DF *UND* ACL_1.0 acl_get_tag_type DF *UND* ACL_1.0 acl_get_entry DF *UND* GLIBC_2.3 lsetxattr DF *UND* ACL_1.0 acl_set_file DF *UND* ACL_1.0 acl_to_text DF *UND* GLIBC_2.3 llistxattr DF *UND* ACL_1.0 acl_delete_def_file ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
> On Wed, 24 Jul 2019 15:54:49 +0100, Adam Weremczuk said: > > On 23/07/19 19:16, Josip Deanovic wrote: > > > Have you checked both file systems for the ACL support? > > ACL support might be disabled. > The client in question (fd) also happens to be Bacula director and sd. > An yes, it does support ACL: > > cat /etc/mtab | grep acl | grep var > /dev/mapper/vg0-var /var ext4 > rw,relatime,user_xattr,acl,barrier=0,stripe=256,data=ordered 0 0 > > grep acl /etc/mke2fs.conf > default_mntopts = acl,user_xattr > > ACLs are widely used for services on the client. > E.g. after I restore /var/lib/samba the service refuses to start without > the right ACL structure. > > The tapes definitely support ACL as well. > I've added a test directory to backups another, similar client (Ubuntu > 16) and ran a couple of setfacl commands on them. > The next day restore had them all as expected. Have you checked if acl and xattr support is compiled into the bacula-fd? objdump -T ...path..to../bacula-fd | egrep 'acl|xattr' __Martin ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On 23/07/19 19:16, Josip Deanovic wrote: Have you checked both file systems for the ACL support? ACL support might be disabled. The client in question (fd) also happens to be Bacula director and sd. An yes, it does support ACL: cat /etc/mtab | grep acl | grep var /dev/mapper/vg0-var /var ext4 rw,relatime,user_xattr,acl,barrier=0,stripe=256,data=ordered 0 0 grep acl /etc/mke2fs.conf default_mntopts = acl,user_xattr ACLs are widely used for services on the client. E.g. after I restore /var/lib/samba the service refuses to start without the right ACL structure. The tapes definitely support ACL as well. I've added a test directory to backups another, similar client (Ubuntu 16) and ran a couple of setfacl commands on them. The next day restore had them all as expected. My entire client.conf file of the troublesome one (Debian 7) with a few bits skipped / anonimised: *** *** *** Client { Name = server_fd Address = server.company.co.uk Catalog = server_catalog Password = "" File Retention = 65 days Job Retention = 2 years AutoPrune = yes } # -- # File Set Definitions # -- # # Reminder: If you change a file set definition then any job which uses # that file set will perform a full backup when next scheduled, regardless # of the level set in the schedule. FileSet { Name = server_fileset Include { Options { signature = SHA1 ##sparse = yes xattrsupport = yes aclsupport = yes noatime = yes checkfilechanges = yes } Options { exclude = yes # No need to backup cached apt files (but keep directories!!) regexfile = "^/var/cache/apt/.*\.(bin|deb)$" regexfile = ... regexdir = ... regexdir = ... regexdir = ... } File = "/" File = "/boot" File = "/var" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } Exclude { File = "/var/cache/apache2/mod_disk_cache" File = "/var/tmp" File = "/mnt/..." File = "/mnt/..." File = "/mnt/..." } } FileSet { Name = server_mysql_fileset Include { Options { signature = SHA1 recurse = no checkfilechanges = yes } File = "/mnt/.../mysql/full_dump.sql" } } # -- # Job Definitions # -- Job { Name = server_backup JobDefs = critical_jobtpl Client = server_fd FileSet = server_fileset Priority = 1 # Because the MySQL database is also running on server, we want to defer # writing file attributes until the job completes in order to help # maximise tape drive throughput. Spool Data = no Spool Attributes = yes } Job { Name = server_mysql_backup JobDefs = critical_jobtpl Client = server_fd FileSet = server_mysql_fileset Priority = 2 Spool Data = no Write Bootstrap = "/var/lib/bacula/bsr/skippy_mysql.bsr" Client Run Before Job = "/etc/bacula/scripts/mysql_dump_start.sh" Client Run After Job = "/etc/bacula/scripts/mysql_dump_end.sh" # This job only does a full backup. For incrementals, we rely on the # standard server job above to include the MySQL binary logs in # "/var/log/mysql". The "mysqlbinlog" tool can then be used to replay # any transactions since the last full dump. Schedule = weekly_sched } *** *** *** My Bacula version 5.2.6 I am really puzzled and worried by this... ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
On Tuesday 2019-07-23 16:33:38 Adam Weremczuk wrote: > Strangely both options were already in client's config file, just failed > to be executed for some reason: > > FileSet { >Name = server_fileset >Include { > Options { >signature = SHA1 >##sparse = yes >xattrsupport = yes >aclsupport = yes >noatime = yes >checkfilechanges = yes > } > Options { >exclude = yes >regexfile =... Have you checked both file systems for the ACL support? ACL support might be disabled. Regards! -- Josip Deanovic ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
Strangely both options were already in client's config file, just failed to be executed for some reason: FileSet { Name = server_fileset Include { Options { signature = SHA1 ##sparse = yes xattrsupport = yes aclsupport = yes noatime = yes checkfilechanges = yes } Options { exclude = yes regexfile =... On 23/07/19 00:56, Chandler wrote: Check the FileSet reference, option aclsupport=yes and/or xattrsupport=yes, https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION00147 -- Chandler / Systems Administrator Arizona Genomics Institute University Of Arizona www.genome.arizona.edu ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] preserving ACL permissions
Hi all, With Bacula 5.2.6 (I know it's old) is it possible to preserve, e.g: Check the FileSet reference, option aclsupport=yes and/or xattrsupport=yes, https://www.bacula.org/5.2.x-manuals/en/main/main/Configuring_Director.html#SECTION00147 -- Chandler / Systems Administrator Arizona Genomics Institute University Of Arizona www.genome.arizona.edu ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] preserving ACL permissions
Hi all, With Bacula 5.2.6 (I know it's old) is it possible to preserve, e.g: ORIGINAL: # file: samba/sysvol # owner: root # group: 300 user::rwx user:root:rwx group::rwx group:300:rwx group:301:r-x group:302:rwx group:303:r-x mask::rwx other::--- default:user::rwx default:user:root:rwx default:group::--- default:group:300:rwx default:group:301:r-x default:group:302:rwx default:group:303:r-x default:mask::rwx default:other::--- RESTORED FROM BACKUP: # file: samba/sysvol # owner: root # group: 300 user::rwx group::rwx other::--- ? I'm glad I've discovered it now, not in a panic disaster recovery situation... Thanks, Adam ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users