Closed jimbo8098 closed 4 years ago
Hello jimbo8098,
Thanks for taking the time to report this issue. I'm currently unable to reproduce it. I'm using the following docker container for testing.
Holland lets you set the umask in the holland.conf file. It defaults to 0007. On my test machine, holland wrote out the file with the expected permissions.
[root@2d89d17f5e08 /]# ls -l /var/spool/holland/mysqldump/20200220_171007/my.cnf
-rw-rw----. 1 root root 9 Feb 20 17:10 /var/spool/holland/mysqldump/20200220_171007/my.cnf
Can you please check the umask setting in /etc/holland/holland.conf?
Also note that you can configure holland to keep the backup contents for a failed backup run.
Change auto-purge-failures
to false in the backupset configuration file, and holland won't purge failed runs until there's a good backup is completed.
Ah, thank you! Setting the umask in /etc/holland/holland.cnf to 0007 fixed the issue.
When running
holland bk
I currently note that it creates a world-writeable file within the backup directory. I'm not entirely sure why!Environment
I am using a docker container running CentOS 7.7 with a Chef Kitchen environment. The environment effectively spins up a new Cent 7.7 box every time with our configuration. This includes holland which is installed using a holland cookbook, specifically this one:
https://github.com/djoos-cookbooks/hollandbackup
I realise this is very old and I'm currently making a PR to bring them up to date which is why I'd like to understand what exactly is wrong with the config here.
For those unfamiliar, Chef cookbooks take a bunch of parameters and build configs based on them in an effort to quickly create mirrored or similar configs.
Current Situation
With the configuration we have, we specify a backupset which has a host, user, pass, single database and a plugin (mysqldump). When I run
holland -d bk <backupset>
I see the following output:When I check the backup directory, for the my.cnf file, I can't see the datestamped directory suggesting that since it failed, it was removed. I did manage to stop the backup at just the right moment and was able to see the structure alongside the my.cnf file and found that the file was listed with, rather oddly, 022 permissions, writeable to all except the owner! The owner, since it's root, is able to write to that file anyway but it's odd.
Expectation
I would have thought that the file would be created with the default chmod values for that directory but it would appear not. Acceptable file permissions would be 644 in this case I reckon but I don't see this being set in the source code anywhere although I must confess, Python is not a language I'm majorly familiar with (shocking I know).